Hi Team,
I am working on SmartGWT version 12.1-p20201118.
I have a listgrid where I have enabled cellSelection by
. In the same grid I also need to implement grouping and hence I am setting the following properties for the same
I noticed that if I comment the
call, cell selection works perfect. But as soon as this call is there, cell selection stops working and whole row is selected.
My implementation of getGroupSortLogic is:
Would request you to please help me how can I keep the GroupSortNormalizer and also enable cellSelection at the same time.
Thanks.
I am working on SmartGWT version 12.1-p20201118.
I have a listgrid where I have enabled cellSelection by
setCanSelectCells(true);
Code:
setGroupByField("mark");
setShowGroupSummary(true);
setShowGridSummary(true);
setShowGroupSummaryInHeader(true);
setNullGroupTitle(Constants.EMPTY_STRING);
setGroupSortDirection(SortDirection.ASCENDING);
setSortByGroupFirst(true);
setGroupSortNormalizer(getGroupSortLogic());
setGroupSortNormalizer(getGroupSortLogic());
My implementation of getGroupSortLogic is:
Code:
private GroupSortNormalizer getGroupSortLogic() {
return (final ListGridRecord record, final String fieldName, final ListGrid grid) -> {
if (record instanceof GroupNode) {
final GroupNode node = (GroupNode) record;
if (fieldName.equals(node.getGroupName()) && node.getGroupValue().equals(Constants.EMPTY_STRING)) {
return 9999;
}
}
return null;
};
}
Thanks.
Comment