Announcement

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

    CanSelectCells not working with setGroupSortNormalizer

    Hi Team,
    I am working on SmartGWT version 12.1-p20201118.

    I have a listgrid where I have enabled cellSelection by
    setCanSelectCells(true);
    . In the same grid I also need to implement grouping and hence I am setting the following properties for the same
    Code:
    setGroupByField("mark");
            setShowGroupSummary(true);
            setShowGridSummary(true);
            setShowGroupSummaryInHeader(true);
    setNullGroupTitle(Constants.EMPTY_STRING);
    setGroupSortDirection(SortDirection.ASCENDING);
            setSortByGroupFirst(true);
            setGroupSortNormalizer(getGroupSortLogic());
    I noticed that if I comment the
    setGroupSortNormalizer(getGroupSortLogic());
    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:
    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;
            };
        }
    Would request you to please help me how can I keep the GroupSortNormalizer and also enable cellSelection at the same time.

    Thanks.

    #2
    From a brief test, they don't conflict, and it's difficult to see how there could possibly be a conflict since these functions are not related to each other.

    So , please show us a minimal, ready-to-run test case demonstrating how a groupSortNormalizer can break cell selection.

    Comment

    Working...
    X