Is there a way of giving a cell a drop down combobox with a small number of choices in it, eg. choosing a currency symbol? In VB6 there was BuildCombo etc.
This will be for all cells in a given column, except where there is no value in column 2 in that row (for example).
Eg. column 8 has the ComboBox if column 2 is valid.
Sorry, I should have explained it better to begin with.
I have a datagrid in VB 2005, where each cell in column 8 is a combobox contain currency symbols eg. £, €, $. When the user enters any cell in this column, they are forced to accept one of the currency symbols, and not to type in something else.
I tried
HTML:
Dim cell As New DataGridViewComboBoxCell
cell.Items.Add("A")
cell.Items.Add("B")
Me.grd1.Item(grd1.CurrentCellAddress.X, grd1.CurrentCellAddress.Y) = cell
in grd1_CellEnter, but the behaviour was quirky and there were error messages. Plainly, that's the wrong place, although the code segment looks promising.
Where should I put the code, for best results? Thank you.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.