Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox valuemember
Message
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00778451
Message ID:
00778522
Views:
10
AFAIK, you can't. I created DataTable and then assigned it to the Combo.
DataTable loCustomer = new DataTable("Customer");
loCustomer.Columns.Add("cName");
loCustomer.Columns.Add("iId");
	
DataRow loNewRow = loCustomer.NewRow();
loNewRow["iId"] = 1;
loNewRow["cName"] = "Go America Communications";
loCustomer.Rows.Add(loNewRow);

loNewRow = loCustomer.NewRow();
loNewRow["iId"] = 2;
loNewRow["cName"] = "Flash Creative Management";
loCustomer.Rows.Add(loNewRow);
>In C# WinForms:
>Does anyone know how to set the valuemember item of a combobox when populating it manually?
>
>ComboBox.Items.Add(“MyListItem”) ;
>
>I need to trim the fields before putting them into the combobox so I can’t just set a datasource and ValueMember.
>
>Thanks,
- Jayesh
Previous
Reply
Map
View

Click here to load this message in the networking platform