News in versions: FastGrid 1.0, TreeGrid 17.0
FastGrid FastSheet ExamplesSamples DocumentationDoc Download Licensing Prices Buy Development
services
References References Contacts
TreeGrid Gantt chart SpreadSheet ExamplesSamples DocumentationDoc Download Licensing Prices Buy Contacts

1. Sorting rows

Sorting rows according to the values in selected columns

  • Setting sorting


    Row sorting can be set per row part as list of column ids in

    Sort

    attribute.
    To sort descending, add "-" before the column id, e.g. Sort:"A,-B".
    To assign an object to row part that already defined rows in array use the part id with "_" suffix, e.g. Body: [...], Body_Cfg: { Sort:"C,D" }
  • Changing sorting


    Sorting can be changed by click to row that has set

    SortIcons

    attribute. By default they are rows D:

    Header

    and

    Index

    .
    The way how the clicked column is added to sorting is controlled by Cfg

    SortType

    .
    The sorting can be cleared by clicking to Tool cell D:

    ClearSort

    or

    Sort

    .
  • Sorting settings


    Some of the global sorting setting can be changed by users in popup menu for Tool cell D:

    Sort

    .
    When comparing values for sorting it is possible to ignore case (Cfg

    SortCaseSensitive

    , column

    CaseSensitive

    ), diacritics (Cfg

    SortLocaleCompare

    , column

    LocaleCompare

    ), some characters (usually spaces) (Cfg

    SortWhiteChars

    , column

    WhiteChars

    ), etc.
    It is possible to sort values as strings or numbers / dates / ranges using column

    NumberSort

    attribute.
    List values are sorted by keys or index by default, to sort by the List values set column

    SortList

    attribute.
    To change the way the cell values are compared, set cell attribute

    SortValue

    to use this value instead of the cell value for comparing.
  • Sorting restrictions


    To not sort the row and fix it on top or bottom, set row

    SortFix

    attribute.
    To not sort row children, set parent row

    NoSort

    .