working with DataGridViewComboBoxColumn cell in c#
C#
1
Posts
1
Posters
0
Views
1
Watching
-
Hello, this is Sergey I have a problem with dataGridView: One of the predefined columnes has type DataGridViewComboBoxColumn with predefined items. When i'm adding new row int index = datagrid.Rows.Add(); and after that trying to set default value in DataGridViewComboBox, DataGridViewCell dgvc = datagrid.Columns[2].CellTemplate; dgvc.Value = "High";// it has index = 0 in items of column datagrid.Rows[index].Cells[2] = dgvc; it throws messages that its incorrect. I've tried in other ways, searching for information, nut i didn't find it Could you help me to set this shirt default value to combobox and get then it back? Thanks, Sergey