Thank you for writing back.
I suppose that you use a GridViewComboBoxColumn
. Let me please explain how does this column work. It is necessary to set the GridViewComboBoxColumn.DataSource
property in order to specify the collection with the available options for this column, e.g. a list of custom objects. Then, set the GridViewComboBoxColumn.DisplayMember
property to indicate which property of the custom objects you will be displayed in the grid cells, set the GridViewComboBoxColumn.ValueMember
property to specify which property of the custom objects will be stored in the cells' values. Consider the following example: you have a class Person containing Id and Name properties. The GridViewComboBoxColumn.DisplayMember
property is set to Name, the GridViewComboBoxColumn.ValueMember
property is set to Id. The DataSource
is set to a list of Person
objects. Then, the grid cells belonging to this columns should contain the Id values, not the Person object itself. Otherwise, the column won't match the values properly. In your case RadGridView
is bound to a collection CarViewModel
records. The CarViewModel
has 3 properties: a numeric Id, a string Description and a collection of ColorViewModel
objects. The third property doesn't return a single record but a whole collection. Hence, you can use this collection to populate a separate column with data explicitly specifying the column's DataSource
to the cell's value. I have prepared a sample project for your reference demonstrating better how to handle this case with populating the combo column. However, have in mind that need to store the color selection in a separate property because otherwise you can't store it since you have only a collection. The achieved behavior is illustrated in the following screenshot:
I hope this information helps. If you have any additional questions, please let me know.