Feb 06, 2013, 7:25 PM
[CLOSED] Grid Panel with Complex Data model and a ComboBox Editor
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.
Thanks,
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.
Thanks,
Last edited by Daniil; Feb 12, 2013 at 5:31 AM.
Reason: [CLOSED]