views:

43

answers:

2

i had two combobox(Catogery, product) in my grid. what i want to do is. if i select category it will display some data set value based on category, and if i select product it will bind some values in that datagrid cells.like price quantity..

i don't have idea about how to write event for combo box selected index change event which is inside the grid.

A: 

Im not sure about that, cuz dont have visual studio atm. But there must be an event called RowCellValueChanged event, write your code in this event, hande row index with EventArgs e and set your values to row which you have an index of row

Serkan Hekimoglu
A: 

Handle the CellEndEdit event on the DataGridView. You'll have to test that the sender is the correct DataGridViewComboBoxColumn, read the value, and use that to bind the other DataGridViewComboBoxColumn to the appropriate data source.

Jamie Ide