Thread: List to select from

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    77

    List to select from

    Hi, I am still learning c# but I have a question. I have created a app that query's a SQL database for a person by their First Name. I have a text box where a user enter the First Name to search. I would like to list all the names that start with the first name in a table and allow the person to select his name from the list. Anything that I can add from the toolbox that would allow me to list the query data into a selectable table?. Thanks for all the help!

  2. #2
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    A ComboBox comes to mind. How you can connect it to your datasource depends on your datasource. As far as I can remember ComboBoxes can be bound to datasources but that seems a bit much for a beginner. Iterate through your query results and .Add them to your ComboBox one by one.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    77
    k, so I was looking at the combobox that would do the job but I wanted something in a list form. In the same category I found Listbox and it does says that users can select from the list. I will give that a try. Thanks for the help!!!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. select()
    By Bnchs in forum C Programming
    Replies: 0
    Last Post: 05-16-2008, 09:48 AM
  2. select help
    By asdffa in forum Networking/Device Communication
    Replies: 3
    Last Post: 11-22-2006, 06:56 PM
  3. Help about Select()
    By n3v in forum Networking/Device Communication
    Replies: 3
    Last Post: 06-23-2006, 06:26 AM
  4. select
    By vasanth in forum Networking/Device Communication
    Replies: 9
    Last Post: 09-02-2004, 02:30 AM
  5. select()?
    By brita in forum Windows Programming
    Replies: 0
    Last Post: 04-02-2003, 01:45 AM