Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi-Column Listbox in Winforms

Status
Not open for further replies.

jtrembla

ISP
Joined
Jul 6, 2006
Messages
104
Location
US
I am using winforms 2.0 and I was wondering what is the best way to do this.

I am populating a listbox via a stored procedure, but as of now only the display member field is showing up. In Microsoft access the listbox usually contains the primary key field and you hide it, this way you know which record the user selects.
Does the listbox in winforms have similar approach or is there a better way to do this. Can you show me sample code?

Thanks,
Jen

 
the listbox has a valuemember and displaymember property the displaymember get shown the valuemember doesn't.

if you need more columns then the listview or datagridview will be needed.



Christiaan Baes
Belgium

My Blog
"In a system where you can define a factor as part of a third factor, you need another layer to check the main layer in case the second layer is not the base unit." - jrbarnett
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top