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

4. Grouping columns to tree

Grouping columns according to the same values in selected rows

  • Setting grouping


    Column grouping can be set per column part as list of row ids in

    Group

    attribute.
    To assign an object to column part that already defined colums in array use the part id with "_" suffix, e.g. Cols: [...], Cols_Cfg: { Group:"C,D" }
  • Changing grouping


    To permit users to change grouping use some Toolbar.
    To permit dropping rows to group by them, define Toolbar with D:

    Group

    ,

    Accept

    : "Row",

    Part

    : "Cols" or another column part(s). This toolbar shows cells with D: "DragGroup".
    To let users to choose some predefined grouping, add Tool cell with D:

    GroupList

    to any Toolbar and define its List attribute with the predefined groupings. It also requires the Part attribute.
    To let users to change grouping settings and / or switch grouping on / off add Tool cell with D:

    Group

    to any Toolbar.
  • Where to show tree


    Column tree can be shown in the independent row part by Cfg attribute

    ColTree

    : 1.
    The main row showing the values the columns are grouped by is defined by column part

    GroupTree

    . To show expand / collapse buttons in this row, use LeftIcons / RightIcons = Collapse
  • Grouping settings


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

    Group

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

    GroupCaseSensitive

    , row

    CaseSensitive

    ), diacritics (Cfg

    GroupLocaleCompare

    , row

    LocaleCompare

    ), some characters (usually spaces) (Cfg

    GroupWhiteChars

    , row

    WhiteChars

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

    SortValue

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


    To restrict some row to group by it set its attribute

    NoGroupBy

    .
    To restrict some column to be grouped set its attribute

    NoGroup

    .
  • Creating group columns


    When grouping, new parent column with D:

    Group

    is created for every group level and different group.
    To not create the parent group columns set Cfg attribute

    GroupAdd

    = 0. In this case the first data column in the group becomes parent of the next columns in the same group.
    To not create the parent group columns for some values, set them in Cfg

    GroupExclude

    .
    To not create the parent group columns with only one child set Cfg

    GroupSingle

    = 0.
    To not create the parent group columns as the only child of their parent set Cfg

    GroupSole

    = 0.
  • Create more group levels per one row


    The cell value can be split for grouping to more values to be used as standalone grouping levels by separator in row attribute

    GroupChar

    or by number of characters set by row attribute

    GroupMaxChars

    .