TreeGrid v6.0

Row basics

TreeGrid documentation index

 

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’/>.

 

API TRow var. string    Kind                                                                                                                                                                            .

Kind of the row set in XML by the tag name.

It can be Header, Filter, 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 visibility

 

<I>                     bool       Visible       [1]                                                                                                                                                           .

If row is displayed in grid.

The row Visible attribute can be changed also by Filter/Search and by deleting row, when deleted rows are hidden.

By API the Visible attribute can be changed by methods ShowRow / HideRow.

Collapsing / expanding children and rendering pages, child pages or child parts does not affect row Visible attribute.

 

The Visible attribute does not directly affect if the row is rendered in grid.

When row has Visible=’0’ on start, it is not rendered at all and it is rendered when it is shown for the first time.

When the already rendered row is hidden by Filter / Search or by HiddenRow, it has set display=’none’ and next showing just clears it.

The visible row can be also not rendered because of collapsed parent (in child paging) or not rendered page, child page or child part.

 

API method      void       ShowRow           (TRow row, bool noshow = false)                                                                             chg 7.0 .

Displays the row in table (sets its Visible property to true).

Since 7.0 it never expands row’s parent, if the parent is invisible or not expanded, the row remains not displayed until the parent is expanded and visible.

To expand all parents to display the row call ExpandParents method after calling ShowRow.

Since 4.7, every row can be hidden, including solid and fixed rows.

 

API method      void       HideRow              (TRow row, bool del = false, bool noshow = false)                                                               .

Hides the row from table, sets its style display=’none’.

If del = true, deletes the row from html table (but not from data).

If noshow is true, only sets Visible attribute, but does not hide the row.

Since TreeGrid 4.7, every row can be hidden, including solid and fixed rows.

 

Row name

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.

 

<I>                     string    Name                                                                                                                                                             new 6.0 .

Row name shown in any text that mention the row.

 

<Cfg>                string[]  NameCol                                                                                                                                                   new 6.0 .

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. Value is these column in the row will be used as row name in any texts mention the row.