Announcement

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

    Issue in grid with functionality of selecting cell and selecting row both

    Hi,

    I have implemented a list grid. In that i want to add a checkbox in starting of each row to select and unselect full row. We have such implementation that we have to set grid.canSelectCells(true). So due to this if i use

    grid.setSelectionType(SelectionStyle.SIMPLE);
    grid.setSelectionAppearance(SelectionAppearance.CHECKBOX);

    then also i can not achieve this(i think this will work if canSelectcells is set to false as i have tried this and works fine for me in that case). But in my case i need to select cells also and have to add a checkbox in starting of each row to select full row. Can you suggest me something to handle this scenario?

    #2
    There isn't a built in feature to support selecting both at the cell and row level as you are requesting here.
    Probably the easiest thing to do is to add your own custom checkbox field to your grid. This would need to have a custom cellFormatter which returns true if every cell in the row is selected (so the checkbox appears checked in this case), and a RecordClickHandler which programmatically selected or deselected every cell in the row as appropriate. You'd probably want to mark this field as "canHide" false and "canResize" false

    Regards
    Isomorphic Software

    Comment

    Working...
    X