I have a gridcontrol which is populated from database like this:
OracleConnection connection= new OracleConnection("DATA SOURCE=mydb;PASSWORD=pass;PERSIST SECURITY INFO=True;USER ID=id");
connection.Open();
OracleDataAdapter adapter = new OracleDataAdapter("select * from mytable", connection);
DataTable datatable= new DataTable();
adapter.Fill(datatable);
adapter.Dispose();
connection.Close();
gridControl1.ItemsSource = datatable.DefaultView;
Then , I change the type of gridcolumns like this:
GridColumn colCOMBOBOX = gridControl1.Columns["COMBO_MULTISELECTION"];
ComboBoxEditSettings combo = new ComboBoxEditSettings();
combo.StyleSettings = new CheckedComboBoxStyleSettings();
combo.ItemsSource = datatable;
combo.DisplayMember = "PERSON";
combo.ValueMember = "COMBO_MULTISELECTION";
colCOMBOBOX.EditSettings = combo;
I have a multiselection combobox in my gridcolumn. Each item from combobox has an id. My problem is : after I select multiple items, I get the error: object must implement iconvertible. So, I made a list that gets the data from database and also I made it Iconvertible. But the error still remains. Everything goes perfect with a combobox that is outside of gridcontrol.Doesn't gridcontrol supports this? How can I solve the problem?