EDIT: the answer is to use a formatter function (see below)
If you have a data store something like this:
var store = new Store({
data: [
{ id: 1, username: {first: 'John', last: 'Doe'},
score: 130, city: 'New York', birthday: '1980/2/5'}
]
});
Is there a way to tell GridX to reference username.first
in a structure something like this? (this doesn't work, but is there a way to do this?)
var columns = [
{field: 'username.first', name: 'Name'}
];
ANSWER:
var columns = [
{name: 'Name', field: 'username',
formatter: function(rowData) {
return rowData.username.first;
}
}
];