dataSet to listbox data filling

Posted by Vijetha under C# on 9/25/2012 | Points: 10 | Views : 4428 | Status : [Member] | Replies : 2
Hi,
How to add multiple columns to listBox and how to bind the Dataset to Listbox?
Please post your suggestions as soon as possible.
i have got urgent deliverable today..

Thanks,
Vijetha




Responses

Posted by: Naraayanan on: 9/25/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
Try this link..
http://www.codeproject.com/Articles/10008/Data-binding-a-ListView

Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/

Vijetha, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Andrewpattinson on: 9/26/2012 [Member] Starter | Points: 25

Up
0
Down
Try

ListBox1.DataSource = myData.Tables[0];
ListBox1.DataTextField = "TheColumnNameYouWantToBindForTextThoseWillDisplayAslistItems";

ListBox1.DataValueField = "TheColumnNameYouWantToBindForValueOfslistItems";
For more visit http://www.dapfor.com/en/net-suite/net-grid/tutorial/data-grouping


Vijetha, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response