Reputation: 394
Dojo datagrid/enhancedgrid v1.10:
Is it possible to change the class & editable-property at runtime? - rerendering the grid could also solve the problem.
function disable(){
// Disable the columns: implement here
var mygrid = dijit.registry.byId("myGrid");
for (var i = 0; i < mygrid.structure.length; i++) {
var column = mygrid.structure[i];
column.editable = false;
column.classes = "";
}
mygrid.setStore(mygrid.store);
}
I have tried to reset the store, but it didn't work:
mygrid.setStore(mygrid.store);
Upvotes: 2
Views: 248
Reputation: 140
You have to use something like this:
var theStructure = mygrid.structure;
theStructure[0].editable = true;
theStructure[0].classes = "editableCell";
mygrid.setStructure(theStructure);
The complete solution can be found at:
Have fun with it!
Upvotes: 2