I have a problem with a DataGridView, i’ve made a DataGridViewComboBoxColumn to add to the grid.
If i click the column.
If the column is selected it still have the DropDownlist with the arrow showing.
If the column is not selected it not looks like a DropDownList to click
In my code i use something like.
Dim column As DataGridViewComboBoxColumn = New DataGridViewComboBoxColumn()
Dim cell As DataGridViewComboBoxCell = New DataGridViewComboBoxCell()
column.CellTemplate = cell
column.Items.Add("40")
column.Items.Add("70")
column.Items.Add("90")
column.Items.Add("100")
column.DropDownStyle = ComboBoxStyle.DropDownList
column.DisplayMember = "Value"
column.DefaultCellStyle.BackColor = Drawing.Color.White
column.ReadOnly = False
GridView.Columns.Add(column)
Don’t know what i’m doing wrong.
Tks in advance.
The combobox cell editor is created only when the cell is in edit mode. If you want to render the cell in a way that looks like a combo you can do that using css or a theme mixin.
See: https://wisej.com/support/question/combobox-dropdownstyle-in-datagridview-is-not-saved
Please login first to submit.