c# - i want to build datagirdviewcomboboxcell dynamically -


i want build datagridview, if choose 1 of item of datagridviewcomboboxcell, other cells in same row should textboxes in other rows turn comboboxes,does knows how that?

it like:

textbox1|textbox2|combobox1.item1|textbox3 |textbox4 |textbox5 |textbox6 textbox1|textbox2|combobox1.item3|textbox3 |textbox4 |textbox5 |textbox6 textbox1|textbox2|combobox1.item2|combobox3|combobox4|combobox5|combobox6 

if want when value in datagridviewcell changes should handle cellvaluechanged event of grid.

if want place cell of specific type in specific location in datagridview can using grid's indexer, e.g.

mydatagridview[columnindex, rowindex] = new datagridviewcomboboxcell(); 

in summary, handle cellvaluechanged event, use if statement test whether value 1 corresponds text box or combo box and, if types of other cells not should be, replace them.


Comments