Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8767429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:48:40+00:00 2026-06-13T16:48:40+00:00

i want to add combobox items and use any other controls in module but

  • 0

i want to add combobox items and use any other controls in module but when i try to use my combobox there, is not recognized. In Window Form Application there was no problem, but in a WPF application I do not know now how to do it?

In WinForm App i do in Module.vb something like that

 Sub FillComboBox()

        Dim SQLStr As String = "use testowa Select COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE (TABLE_NAME = 'Import')"
        Dim Reader As SqlDataReader
        Dim cmd As New SqlCommand(SQLStr, myConnection)

        Form2.ComboBox7.Items.Add("None")
        Form2.ComboBox3.Items.Add("None")


        Reader = cmd.ExecuteReader()

        While Reader.Read()
            Form2.ComboBox1.Items.Add(Reader.Item("COLUMN_NAME"))
            Form2.ComboBox2.Items.Add(Reader.Item("COLUMN_NAME"))
            Form2.ComboBox4.Items.Add(Reader.Item("COLUMN_NAME"))
            Form2.ComboBox5.Items.Add(Reader.Item("COLUMN_NAME"))
            Form2.ComboBox6.Items.Add(Reader.Item("COLUMN_NAME"))
            Form2.ComboBox7.Items.Add(Reader.Item("COLUMN_NAME"))
            Form2.ComboBox3.Items.Add(Reader.Item("COLUMN_NAME"))
        End While

        Reader.Close()


    End Sub

Now i need to do the same thing in WPF app.

Please help, these are my first steps in WPF 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T16:48:41+00:00Added an answer on June 13, 2026 at 4:48 pm
    • fill a collection (eg. List of string) from your SQL
    • set this collection as the ItemsSource for your combobox

    thats all

    ps: pls read something about binding in wpf. dont try to code your winform style with wpf.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know how to add items to a ComboBox, but is there anyway to
I want to use a ComboBox in WPF to store some names, but I
I want to add new item in combobox. But this item should be top
I have a combobox that I want to be able to add items to
I have a combobox in a form and a button. I want to add
I want add UIGestureRecognizerDelegate to UIWebView,but failed. if [self.view addsubView:webView]; So UIWebView is ok,but
I have problem, when I want add Node to my GUI from other Thread.
I want to add JComboBox inside a JTable (3,3) on column 1. But in
I'm adding new controls to the main control this way: Controls.Add(new ComboBox() { Text
I would like to fill a ComboBox but I want to sort data by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.