Announcement

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

    disable user sort but enable coded multi sort

    Hi,

    I'm seeing something strange:
    Code:
    grid.setCanSort(true);
    SortSpecifier specifier1 = new SortSpecifier(F1, SortDirection.ASCENDING);
    SortSpecifier specifier2 = new SortSpecifier(F2, SortDirection.ASCENDING);
    grid.setSort(new SortSpecifier[]{specifier1, specifier2});
    => shows the sort number & direction arrow in the grid columns and sorts the 2 columns (OK)


    Now I don't want users to mess with the sort, so I disable it:
    Code:
    grid.setCanSort(false);
    SortSpecifier specifier1 = new SortSpecifier(F1, SortDirection.ASCENDING);
    SortSpecifier specifier2 = new SortSpecifier(F2, SortDirection.ASCENDING);
    grid.setSort(new SortSpecifier[]{specifier1, specifier2});
    => shows the sort number, but no direction arrow (any reason for that? NOK), and the sorting is actually NOK on the 2nd column. Changing it into DESCENDING, doesn't do a thing either.
    So I'm guessing a multi sort isn't going OK when setCanSort is false?

    Also tried with
    Code:
    grid.setCanSort(false);
    grid.setCanMultiSort(true);
    but that gives the same bad result.


    thx,

    SmartGWT 3.0 SC_SNAPSHOT-2011-12-05/Pro Deployment (built 2011-12-05)

    #2
    For now we'd recommend leaving 'canSort' set to true and disabling user-initiated sort by cancelling the headerClick handler.

    We've assigned a developer to take a look at this and determine whether we need a framework change to handle this more neatly.

    Comment

    Working...
    X