Hi, I am using a RadGridView and have a column that is a GridViewComboBoxColumn.
The ComboBox is bound to a collection of values that are :
ValueMember : DisplayMember
"" : [None]
A : A
B : B
C : C
If the user selects value member A, B or C, all is fine and the associated display member is displayed.
But if the user selects the value member "" (an empty string) the display member [none] is not displayed and the ComboBox displays nothing. It is like as if when I select an empty string the list will by default go back to selectedIndex = -1.
Here's a code example:
Anyway, to have my [None] display member to be displayed correctly when the empty string value is selected?
Thanks!
The ComboBox is bound to a collection of values that are :
ValueMember : DisplayMember
"" : [None]
A : A
B : B
C : C
If the user selects value member A, B or C, all is fine and the associated display member is displayed.
But if the user selects the value member "" (an empty string) the display member [none] is not displayed and the ComboBox displays nothing. It is like as if when I select an empty string the list will by default go back to selectedIndex = -1.
Here's a code example:
public class ItemComboBox
{
public string CleItem { get; set; }
public string ValeurItem { get; set; }
}
List<
ItemComboBox
> liste = new List<
ItemComboBox
>();
liste.add(new ItemComboBox("", "[None]"));
liste.add(new ItemComboBox("A", "A"));
liste.add(new ItemComboBox("B", "B"));
liste.add(new ItemComboBox("C", "C"));
//cboInsRslCd is my ComboBoxColumn
cboInsRslCd.DataSource = liste;
cboInsRslCd.ValueMember = "CleItem";
cboInsRslCd.DisplayMember = "ValeurItem";
Anyway, to have my [None] display member to be displayed correctly when the empty string value is selected?
Thanks!