Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Hide specific cells in tree grid

    Hi,

    I have a TreeGrid with a parent node. The problem is the checkboxes should only be displayed on the child items and not on the parent node. The grid looks as follows. How can i hide the yellow cells ?

    Click image for larger version

Name:	grid.PNG
Views:	145
Size:	9.8 KB
ID:	240070

    I am using gwt 2.6 und smartgwt 6.0p. This is the code for the field creation(all 3 are the same)

    TreeGridField a= new TreeGridField(Cols.a,
    MSG.a());
    a.setCanFilter(false);
    a.setType(ListGridFieldType.BOOLEAN);

    Thanks for your help

    #2
    You can add a CellFormatter to directly output checkboxes or not output them on leaf vs folder nodes.

    If you will be using canEdit mode as well (or the canToggle flag on treeGridField) you also need to implement canEditCell to return false for parent nodes.

    Comment

    Working...
    X