Hello,
Is it possible to do the following inside the XML definition: grid.cells(id,ind).setDisabled(true);?
Something like:
similar to how rows can be locked by using:
?
Thanks
Hello,
Is it possible to do the following inside the XML definition: grid.cells(id,ind).setDisabled(true);?
Something like:
similar to how rows can be locked by using:
?
Thanks
You can add “disabled” attribute to the tag:
Cell value
and then add following code you your page:
mygrid.attachEvent("onRowCreated",function(id){
var cell = mygrid.cells(id,COLUMN_INDEX);
if (cell.getAttribute("disabled")) cell.setDisabled(true);
})
What if I don’t know the column index ahead of time though? In the case where the same JavaScript is being used for multiple grid configurations, that are defined in the XML?
I was able to get it working by doing this:
grid.attachEvent('onEditCell', function(stage, rowId, cellId) {
if (grid.cells(rowId, cellId).getAttribute('disabled')) {
grid.cells(rowId, cellId).setDisabled(true);
return false;
}
return true;
});