I'm building a property-editor style grid with a readonly column with the name of the property and then an editable column to enter data. Some of the rows have drop-down values where they have their own unique choice of drop-down entries. I can get the comboBoxEditor to appear with the following code:
but I am having trouble optimizing the use of the combobox for data entry. The comboBox loses its value as you tab through the cell without changing anything. Basically I haven't found any way to set the selected index or the value. I think it has to do with the Items property never being populated, but I can't get it to populate even though the DataSource is set.
Any ideas?
Thanks,
Adam
private void radGridView1_EditorRequired(object sender, EditorRequiredEventArgs e)
{
List<
string
> fixedValues = GetFixedValues();
if (fixedValues == null) return; //will use a normal textbox editor for items with no fixedValues
RadComboBoxEditor comboEditor = new RadComboBoxEditor();
(comboEditor.EditorElement as RadComboBoxEditorElement).DataSource = fixedValues;
e.Editor = comboEditor;
e.EditorType = typeof(RadComboBoxEditor);
}
but I am having trouble optimizing the use of the combobox for data entry. The comboBox loses its value as you tab through the cell without changing anything. Basically I haven't found any way to set the selected index or the value. I think it has to do with the Items property never being populated, but I can't get it to populate even though the DataSource is set.
Any ideas?
Thanks,
Adam