You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
I got a Json Array which has some of the attributes nested , after small changes I applied I managed to support it all the way from the Json to the Widget and back to the Store.
Main change is to work with dojo.get /set Object to get nested access to nested json attributes
It will be good to have it as regular Dojox Grid doesn't support it due to the old Store Usage.
dgrid/editor.js
function edit(cell) {
From:
value = (dirty && field in dirty) ? dirty[field] :
column.get ? column.get(row.data) : row.data[field];
To:
value = (dirty && field in dirty) ? dirty[field] :
column.get ? column.get(row.data) : dojo.getObject(field,false,row.data);
dgrid/Grid.js
renderRow: function(object, options){
From:
}else if("field" in column && column.field != "_item"){
data = data[column.field];
To:
}else if("field" in column && column.field != "_item"){
data = dojo.getObject(column.field,false,data);
cheers
Tsemach.
The text was updated successfully, but these errors were encountered:
Hi
I got a Json Array which has some of the attributes nested , after small changes I applied I managed to support it all the way from the Json to the Widget and back to the Store.
Main change is to work with dojo.get /set Object to get nested access to nested json attributes
It will be good to have it as regular Dojox Grid doesn't support it due to the old Store Usage.
Changes in Summary:
updateDirty: function(id, field, value){
From:
dirtyObj[field] = value;
To:
dojo.setObject(field, value,dirtyObj);
function edit(cell) {
From:
value = (dirty && field in dirty) ? dirty[field] :
column.get ? column.get(row.data) : row.data[field];
To:
value = (dirty && field in dirty) ? dirty[field] :
column.get ? column.get(row.data) : dojo.getObject(field,false,row.data);
renderRow: function(object, options){
From:
}else if("field" in column && column.field != "_item"){
data = data[column.field];
To:
}else if("field" in column && column.field != "_item"){
data = dojo.getObject(column.field,false,data);
cheers
Tsemach.
The text was updated successfully, but these errors were encountered: