Search This Blog

SmartGWT: make a grid cell non-editable/readonly

You can override the method protected boolean canEditCell(int rowNum, int colNum) in ListGrid


public class XmlTreeGrid extends TreeGrid {

public XmlTreeGrid() {
//
}

protected boolean canEditCell(int rowNum, int colNum) {
if (colNum == 0) {
return false;
}
XmlTreeNode node = (XmlTreeNode) getRecord(rowNum);
if (node.value() == null) {
return false;
}
return true;
}

}


See Also here

1 comment: