TreeGrid v7.0

Column tree

TreeGrid documentation index

 

Since 7.0 version TreeGrid supports tree also in columns, it means hiding and showing individual columns on click to expand / collapse button in some cell (usually header cell).

Similarly it supports also showing and hiding individual rows (usually, but not required, fixed rows) on click to Expand button.

The collapsed / expanded columns or rows do not need to be adjacent!

The tree level count is not limited!

 

<C>                   bool       Visible       [1]         Saved to cookies, avoid it by <C VisibleLap=’1’/>                                                    .

If the column is displayed in grid. Set <C Visible=’0’ Hidden=’1’/> for collapsed columns on start.

 

<C>                   bool       Hidden      [0]                                                                                                                                new 6.0 .

Hidden=’1’ can be set only for Visible=’0’ and <Cfg FastColumns =’1’/>. This column will be rendered as hidden (width 0px).

It slows down rendering grid (the column is rendered) but speeds up showing / expanding the column (it is just resized).

Set <C Visible=’0’ Hidden=’1’/> for collapsed columns on start.

 

<Cfg>                bool       FastColumns  [1]                                                                                                                   new 6.0 .

If column hiding is done by setting its width to 0px. This action is faster than removing the cells and speeds up also showing the column.

For expanding / collapsing columns is strongly recommended to use default setting FastColumns=’1’.

 

<I>                     bool       Visible       [1]         Saved to cookies, avoid it by <Cfg ExpandedLap=’1’/>                                          .

If the row is displayed in grid. Set to 0 for collapsed rows on start.

 

<C> <cell>        string    Button                    Button = “Expand”                                                                                new 7.0 .

To show right side Expand button set Button=”Expand”.

It is shown usually in <Header> cell to show / hide columns, but can be shown in any cell, in variable, fixed or space cell.

 

<C> <cell>        string    Icon                           Icon = “Expand”                                                                                    new 7.0 .

To show left side Expand button set Icon=”Expand”.

It is shown usually in <Header> cell to show / hide columns, but can be shown in any cell, in variable, fixed or space cell.

 

<C> <cell>        string[]  ExpandCols                                                                                                                            new 7.0 .

A list of column names to show / hide them on click to Button=’Expand’.

If you want to have deep tree of expanding columns (more nested levels) you must list here only immediate children, not the whole tree. And set appropriate ExpandLevel to the columns.

 

<C> <cell>        string[]  ExpandRows                                                                                                                        new 7.0 .

A list of row ids to show / hide them on click to Button=’Expand’

 

<C> <cell>        bool       Expanded           [ ]          Saved to cookies, avoid it by <Cfg ExpandedLap=’1’/>               new 7.0 .

Initial state of the Button=’Expand’.

If not set, the state is 1 if any column in the ExpandCols is visible. If ExpandCols is not defined it tests ExpandRows.

If neither ExpandCols nor ExpandRows defined returns state of row Expanded attribute.

Set it for more complex tree where the Expanded state is computed incorrectly.

 

<C> <I>             int          ExpandLevel   [ ]          Saved to cookies, avoid it by <C VisibleLap=’1’/> or <Cfg ExpandedLap=’1’/> for rows         new 7.0 .

The row / column is shown on click to Expand Button when its ExpandLevel is positive (>=1). It is hidden if its ExpandLevel is zero or negative (<=0).

Use it when more Expand Buttons show / hide one row / column.

If not set, every Expand Button shows / hides the row / column on its click.

If set, click to Expand Button will increase (when expanding) / decrease (when collapsing) this value and only if the value changes from 0 to 1 (shows the column / row) or from 1 to 0 (hides the column / row).

The ExpandLevel must be set accordingly to the row / column Visible attribute and also Expanded state of the Expand Buttons that control the row.

Let’s say there are three collapsed buttons that control the row. Setting ExpandLevel=’-2’ means that all three buttons must be expanded to show the row. Setting ExpandLevel=’0’ means that every button shows the row and all three buttons must be collapsed to hide it. The row attribute Visible must be set to ‘0’.

Let’s say there are three expanded buttons that control the row. Setting ExpandLevel=’1’ means that all three buttons must be expanded to show the row. Setting ExpandLevel=’3’ means that every button shows the row and all three buttons must be collapsed to hide it. The row attribute Visible must be set to ‘1’.

 

API method      bool       IsCellExpanded        (TRow row, string col)                                                                     new 7.0 .

Returns true if the cell side Button Expand is expanded.

 

API method      void       ExpandCell       (TRow row, string col)                                                                                   new 7.0 .

Expands or collapses the rows / columns defined by ExpandCols / ExpandRows in the cell.

 

<Actions>                      ExpandCell ...F          assigned to event OnClickSideExpand                                         new 7.0 .

Expands or collapses the rows / columns defined by ExpandCols / ExpandRows in actual or focused cell.

 

<Actions>                      ExpandAllCells         not assigned to any event                                                                new 7.0 .

Expands all cells in all Header rows in grid.

To expand cells in other rows use API IsCellExpanded / ExpandCell in loop instead.

 

<Actions>                      CollapseAllCells      not assigned to any event                                                                 new 7.0 .

Collapsed all cells in all Header rows in grid.

To collapse cells in other rows use API IsCellExpanded / ExpandCell in loop instead.