maps_tecnologia
6 Feb 2012, 12:52 PM
Hello.
I have a tree.Panel which store is populated by a dinamic json. Dinamic in the way that the data retrieved depends on user actions, so the columns my grid shows are dinamically configured.
Basically I get an Object containing all the fields I have to show, and for each column I have:
renderer: function(cell) {
return cell[Ext.Object.getKeys(value)[0]];
},
dataIndex: 'fullObject',
Which translates to something like:
renderer: function(cell) {
return fullObject.fieldName;
},
dataIndex: 'fullObject',
That works fine, but I can't order the columns.
I tought that maybe I had to provide the data types. which I did, but that doesnt seemed to work.
This is one of the columns configuration:
Object
dataIndex: "fullObject"
renderer: function (cell) {
arguments: null
caller: null
length: 1
name: ""
prototype: Object
__proto__: function Empty() {}
sortable: true
text: "Quantity"
type: "number"
__proto__: Object
I have a tree.Panel which store is populated by a dinamic json. Dinamic in the way that the data retrieved depends on user actions, so the columns my grid shows are dinamically configured.
Basically I get an Object containing all the fields I have to show, and for each column I have:
renderer: function(cell) {
return cell[Ext.Object.getKeys(value)[0]];
},
dataIndex: 'fullObject',
Which translates to something like:
renderer: function(cell) {
return fullObject.fieldName;
},
dataIndex: 'fullObject',
That works fine, but I can't order the columns.
I tought that maybe I had to provide the data types. which I did, but that doesnt seemed to work.
This is one of the columns configuration:
Object
dataIndex: "fullObject"
renderer: function (cell) {
arguments: null
caller: null
length: 1
name: ""
prototype: Object
__proto__: function Empty() {}
sortable: true
text: "Quantity"
type: "number"
__proto__: Object