Click here to Skip to main content
15,899,562 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using A data grid view into which first column is the Product Name which is a Combo box Column. On Form Load i am filling Product names as display member and product id as value member in the combo box.
Now I want to do is when i am selecting any product from combo box i want to display its relate information,i am trying to get it by product id....How to do this?????????????????
Posted

1 solution

Look around ComboBox properties like: SelectedValue, SelectedValuePath, DispalyMemberPath, ItemsSource. With proper sources binding you can do this very quick and easy. I could give you more accurate answer but need to see your code with DataGrid and ComboBox declaration.
 
Share this answer
 
Comments
[no name] 28-Sep-12 14:02pm    
try some thing like

int value = cmb.SelectedValue;

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900