How to access a comboBox in dataGridView?
-
hi, i have a small question.. How can i add and access a ComboBox in dataGridView.. i means,how can i add new Lines in these ComboBoxes and check which line is selected? thank you G.
Admin887 wrote:
how can i add new Lines in these ComboBoxes
You find the correct column from the datagridview's columns[^] collection (which is an instance of DataGridViewComboBoxColumn). Then on DataGridViewComboBoxColumn you have Items[^] collection or DataSource[^].
Admin887 wrote:
check which line is selected
Through the Value[^] property.
The need to optimize rises from a bad design.My articles[^]
-
Admin887 wrote:
how can i add new Lines in these ComboBoxes
You find the correct column from the datagridview's columns[^] collection (which is an instance of DataGridViewComboBoxColumn). Then on DataGridViewComboBoxColumn you have Items[^] collection or DataSource[^].
Admin887 wrote:
check which line is selected
Through the Value[^] property.
The need to optimize rises from a bad design.My articles[^]