Apr 03, 2013, 8:09 PM
[CLOSED] GridPanel bind to complex JSON results
I am attempting to bind GridPanel columns to a complex JSON result, and have no idea how to represent the binding in a DataIndex. I've tried various things in terms of syntax and cannot get a result. I've considered cheating by using a column renderer, but I don't know if that is the best way to go. Flattening the data structure I am serializing is difficult because it's being generated from multiple Entity Framework entities.
In any case, the basic structure of the JSON object is:
Data Model
Column Model
Property A, Property B, Other A, Other B, Other C, Other D
Creating the column model is easy, I just can't figure out how to map DataIndex. What are my options? I've searched these forums and even extjs forums and haven't found a reliable solution.
In any case, the basic structure of the JSON object is:
Data Model
var object = {
propertyA: '',
propertyB: '',
properties: [
{ otherA: '', otherB: '' },
{ otherC: '', otherD: '' }
]
};
So note, I have an object with several properties, than an array of other objects. I need to be able to create a column model like:Column Model
Property A, Property B, Other A, Other B, Other C, Other D
Creating the column model is easy, I just can't figure out how to map DataIndex. What are my options? I've searched these forums and even extjs forums and haven't found a reliable solution.
Last edited by Daniil; Apr 09, 2013 at 4:12 AM.
Reason: [CLOSED]