Accessing fields with '@' symbol of object in dGrid
I have an issue to set fields of layer in dGrid.
store = new Memory({data: someData});
grid = new Grid({
store: store
});
layout = {[label: 'ID', field: '@attributes', formatter: getId]};
grid.set('columns', layout);
the someData is an object with the following structure
someData = {
@attributes: {
id: someId
}
};
getId = function (value, rowId) {
return value.id;
};
well, it cannot get the Id or anything.
I appreciate any suggestion. Thanks in advance :)
No comments:
Post a Comment