locked
How to get data in a combobox

    Question

  •  

    Hi from Colombia, i need some help please, i'm trying to load a combobox with a database  in sql server 2005 with c#, i'm doing this aplication en visual web developer 2005 express, i'm really worried because i can't find any information about this, thanks for your colaboration.
    Wednesday, November 07, 2007 1:58 PM

Answers

  • There is more information in the MSDN library than you could download before your PC became obsolete.

     

    http://msdn2.microsoft.com/en-us/library/x8ybe6s2(VS.80).aspx

     

    Data binding database information to Form Controls can be a very confusing subject.  You are not alone.  I have found it most useful to create separate tables within SQL databases to bind a control.  It could also be done with views, but I find that I can alter the contents dynamically if I bind my controls to a table that contains a single column of the data I wish to present in my combo box. 

     

    BEWARE.  Sorting the contents of the table is tricky.  Binding to a view that performs a sort will not do the trick.

     

    Rudedog

    "Fooling computers in a procedural world."

     

    Wednesday, November 07, 2007 4:20 PM