View Full Version : [CLOSED] Grid Panel with Complex Data model and a ComboBox Editor

Feb 06, 2013, 7:25 PM
Hello, I have a problem when creating a Grid Panel from a complex class. I have a data model that is illustrated below:

class country:
string Name
int ID

class company:
string Name
country Country

When I generate a GridPanel to display the model for Company I can successfully view the correct output using a renderer, however, when I go to edit the values of "Country" via a comboBox editor the initial displayed value is [object Object] instead of the correct value from a list of countries. I have set my Display and ID properties on the ComboBox and tried to create beforeEdit functions to select the correct value, but it never displays the correct value. Other posts have mentioned a solution of using and addition CountryID column in the model and editing that value instead of actually editing the correct data object. This does not work for me and I need to directly edit the Country value.

Can you please advise on how I can achieve the correct display of values.


Feb 06, 2013, 11:03 PM

It's difficult to say something without example to reproduce.

Also, please, take a look at the following example, it has very similar data structure to yours: http://examples2.ext.net/#/GridPanel/Data_Presentation/Editor_Field_Mapping/