Announcement

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

    Listgrid having conflict when setting both checkbox select and grouping on it

    We are using smartgwt v1.2 (It is an old version but can not update it before next release of our product)

    I have Listgrid which has checkbox select as well as grouping by field :-

    ListGrid vipServiceGrid = new ListGrid();
    vipServiceGrid.setAlternateRecordStyles(true);
    vipServiceGrid.setAutoFetchData(true);
    vipServiceGrid.setShowAllRecords(true);
    vipServiceGrid.setSelectionType(SelectionStyle.SIMPLE);
    vipServiceGrid.setSelectionAppearance(SelectionAppearance.CHECKBOX);

    ListGridField application = new ListGridField("application", "Application");
    ListGridField serviceName = new ListGridField("serviceName", "VIP Name");
    ListGridField vip = new ListGridField("serviceIp", "IP Address:Port");
    vipServiceGrid.setFields(application, serviceName, vip);

    vipServiceGrid.setGroupByField("application");
    vipServiceGrid.hideField("application");


    The problem is that since I have added the "setGroupByField()", the checkbox in ListGrid header is not working properly. If I click it, then it selects all the rows in grids but if I sepecifically unselect the checkbos for any row in the grid then the header checkbox still stays checked.
    Also when I am using vipServiceGrid.deselectAllRecords(), all rows get de-selected but the ListGrid header checkbox still comes as selected.

    All these issues go away if I remove the grouping.

    Please help, as I need both things to work together.
Working...
X