Row basics

TreeGrid documentation

Rows in TreeGrid contain cells, including their values - call values are defined only in rows, not in columns.

TreeGrid can contain variable data rows, fixed data rows, fixed special rows, solid space rows and solid special rows.

Rows by functionality

Data rows

Standard rows structured to sections, columns and cells containing values. They can be fixed or variable. Are set by <I> tag inside <Head>, <Foot> and <B> tags.
By default have data rows one cell in every column. But the cells can be also spanned horizontally (by Span attribute) or vertically (by RowSpan attribute).
And the rows can also contain one or all custom sections without cells - the whole column section is spanned and custom HTML is displayed, from attribute specific for the section LeftHtml / MidHtml / RightHtml.
Data rows can also contain specific column definitions for individual cells (like Type or Format).

Row position in tree is done by placing <I> tags inside their parent <I> tag. Variable rows order in body is by default set by position of the <I> tags inside their parent, but is affected by actual sorting.

Space rows

Nonstandard rows not structured to columns and sections, but containing independent cells with values. They can be only solid. Are set by <I> or <Space> tag inside <Solid> tag.

Special rows

All rows with special functionality, they can be fixed (<Header>, <Filter>) or solid (<Group>, <Search>, <Toolbar>, <Tabber>).
The changes in cell values are usually not updated to server.
The special rows are editable even if the grid has restricted editing by <Cfg Editing='0'/>.
upd 12.0 API TRow var. string

Kind

Kind of the row set in XML by the tag name.
It can be Header, Filter, Panel (since 12.0), Group, Search, Toolbar, Tabber and Space for other Space rows or Data for all other non Space rows.

Rows by position

Variable (scrollable) rows

Standard data rows placed inside grid's <Body> section to <B> pages. If grid does not use paging, all the variable rows are in one page, otherwise they are in more pages.
They can be scrolled vertically or horizontally, paged, structured to tree, sorted, filtered, grouped. They can also be added, deleted or moved.
Variable rows can be only data rows. Variable rows are base rows in TreeGrid.

Fixed (frozen) rows

Standard rows placed to <Head> or <Foot> section above or bellow the <Body> section. They are still visible and cannot be scrolled vertically, only horizontally.
Rows order is set by position of the <I> tags inside the section <Head> or <Foot>.
They cannot be paged, structured to tree, sorted, filtered, grouped. They also cannot be added, deleted or moved, only shown or hidden by API.
Fixed rows are still divided to cells or at least to column sections (left, variable, right), so the variable column section is horizontally scrollable.
If all fixed and solid rows plus header together are higher then main tag height, the grid cannot display its content and displays only "Too small extents" message.
Fixed rows can be data rows, usually some sum or total result rows, or rows with some global input parameters.
Fixed rows can also be special filter rows.

Solid (floating) rows

Solid space rows contain its own cells (set by Cells attribute) with their own widths not corresponding with grid columns widths and positions.
Rows position inside grid is specified by Space attribute (0 above Head, 1 - between Head and Body, 2 - between Body and Foot, 3 - between Foot and scrollbar, 4 - below scrollbar).
Rows order inside section specified by Space is set by positions of <I> tags inside the tag <Solid>.
Their content is always visible and never scrolled. They have their own structure independent on columns.
The Solid space rows can also display custom html instead of cells, set by Html attribute.
They are still visible and cannot be scrolled. They cannot be paged, structured to tree, sorted, filtered, grouped. They also cannot be added, deleted or moved, only shown or hidden.
If all fixed and solid rows plus header together are higher then main tag height, the grid cannot display its content and displays only "Too small extents" message.
Solid rows can be space rows and also special group row, search row, simple pager and toolbar.
API TRow var. string

Fixed

Position in table, it can be Head or Foot for fixed rows and Solid for Space rows. For all other rows is null.

Row name

Row visual identification

You can specify row name that will be shown in messages and alerts that speaking about the row.
For example "Are you sure to delete row '%d' ?", the %d will be replaced by row name.
The row name is its Name attribute if set. Or value(s) in NameCol if set. Or row id.
new 6.0 <I> string

Name

Row name shown in any text that mention the row.
new 6.0 <Cfg> string[ ]

NameCol

One or more column that are used as row name, only if the row Name attribute is not set.
Comma separated list of column names. Values from these column in the row (comma separated) will be used as row name in any texts mention the row.
It is possible to set NameCol to the same value as RowIndex to use the row index as row name.

Row id

Row unique identification. See Row id document

Unique identification of every row in grid, including, hidden, fixed and space rows.
The row ids are described in separate document Row id.

Row index

Row position

Shows column with row positions, usually as number from 1.
It does not identify row uniquely, for row identification use row id instead.
Used also for editable formulas. See also column index.
new 9.3 renamed 12.0 <Cfg> string

RowIndex

Since 12.0 it was named UpCounter.
Column name that will show the row positions in grid.
If the column does not exist, it is created in the LeftCols next to the Panel as <C Name='RowIndex' Type='Int or Text' CanEdit='0' CanSort='0' Width='30'/>
It is possible to set NameCol to the same value as RowIndex to use the row index as row name.
I does not work in server paging.
It iterates all the RowIndex cells after any row order change and resets the value, so it can be slow in very large grids.
new 9.3 renamed 12.0 <Cfg> int

RowIndexType

[0]
Since 12.0 it was named UpCounterType.
Bit array of flags for the RowIndex.
1. bit&1Count deleted rows
2. bit&2Count filtered rows
3. bit&4Count manually hidden rows (other than deleted and filtered)
4. bit&8Count collapsed children
5. bit&16Reset on children (first child gets 1). It causes more rows with the same index! The GetRowByIndex cannot be used!
6. bit&32Count fixed data rows
7. bit&64Count other fixed rows like Filter, but not Header
8. bit&128Count Header rows and (since 13.0) ColIndex row
For example RowIndexType='7' counts all hidden and deleted rows.
new 12.0 <Cfg> int

RowIndexStart

[1]
The index is created from this number. Useful to have all indexes the same length (e.g. starting from 1000).
new 12.0 <Cfg> int

RowIndexChars

[ ]
Characters to build the index. By default the index is a number. Setting the RowIndexChars="ABCDEFGHIJKLMNOPQRSTUVWXYZ" use alphabetical indexes.
new 13.0 <Cfg> int

RowIndexWidth

[60]
Width of created RowIndex column, in pixels. Used only of the column does not exist in grid.
new 12.0 <Cfg> int

AutoRows

[ ]
If set, automatically generates given number of empty rows as the last children in the last page. Cannot be used in server paging.
The rows will get auto generated ids (not the same as RowIndex).
See also AutoPages to add new rows on scroll down.
new 9.3 renamed 12.0 <I> int

NoIndex

Since 12.0 it was named NoUpCounter
If set to 1, the row and its children will not be counted by RowIndex
(new 11.0) If set to 2, the row only will not be counted by RowIndex, but the row's children will be counted.
(new 11.0) If set to 3, the row's children will not be counted by RowIndex, but the row itself will be counted.
new 12.0 TRow variable int

HasIndex

Row position from 1 or 0 for row without index. On grid loading it is available in OnReady and later.
It is not affected by RowIndexStart / RowIndexChars.
new 12.0 API event TRow

GetRowByIndex

(type index, bool type = 0)
Returns row according to its index. On grid loading it is available in OnReady and later.
For type = 0 The index is number from 1 as for row (HasIndex).
For type = 1 The index is number or string according to the displayed row index in RowIndex column.
new 12.0 API event type

GetRowIndex

(TRow row, bool type = 0, type default = null)
Returns row index. The row can be row object or row id. On grid loading it is available in OnReady and later.
For type = 0 Returns number from 1 as the row (HasIndex).
For type = 1 Returns number or string as the displayed row index in RowIndex column.
If the row has not index, return default.
new 9.3 renamed 12.0 API event bool

OnRowIndex

(TGrid grid, string[ ] values)
Since 12.0 it was named OnUpCounter
Called on recalculate the RowIndex column.
(new 12.0) values contains the changed indexes that will be assigned after the event finishes. It is named array as new value by row id. The indexes are always from 1, the index to delete is set as "".
(new 12.0) You can modify the values, but you cannot add or delete the items from the array.
Or you can assign your own index to the RowIndex column and true to not process the values, it is not possible if the index is used for calculated formula.