Row visibility

TreeGrid documentation

<I> bool

Visible

[1]
If the 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 the CSS attribute.
The visible row can be also not rendered because of collapsed parent (in child paging) or not rendered page, child page or child part.
new 12.0 <I> bool

Hidden

[0]
The Hidden attribute is set by manual hiding and showing rows.
If set Hidden='1' the row is not shown/hidden by any filter.
new 14.0 <Cfg> bool

HideParents

[0]
If set, hides parent rows without hiding their children by setting their attribute Expanded = 2 or 3.
new 12.1 <Cfg> int

SaveVisible

[0] Saves information to cookies
Saves row Visible state to cookies. All rows must have set id attribute.
If set 1. bit &1, saves Visible state of all fixed and space rows.
If set 2. bit &2, saves Visible state of all variable rows to cookies.
If set 3. bit &4, saves the state of all rows that can be hidden. Otherwise saves state of only rows that differs from their default row's Visible state.
Remember, cookies are limited to 4096 bytes for the whole page, so use this setting only for very small tables or use PersistentCfg.
Also use the smallest ids as possible (the amount of space is used: id+1 bytes per row).
Cannot be used with server side paging. Cannot be used for automatically created group rows.
new 12.1 <Cfg> string

HiddenRows

All rows (comma separated ids) that will be hidden. It is done on start.
It overrides the states saved by SaveVisible.
new 12.1 <Cfg> string

VisibleRows

All rows (comma separated ids) that will be shown. It is done on start.
It overrides the states saved by SaveVisible.
chg 7.0 upd 14.0 <I> void

ShowRow

(TRow row, bool noshow = 0, bool expanded = 0)
Displays the row in grid, sets its Visible property to 1.
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.
If noshow is 1, only sets Visible attribute, but does not show the row.
Since 14.0 if expanded is 1 and the row has Expanded = 2 / 3, it sets Expanded to 0 / 1 and shifts the children.
Can be called also for solid and fixed rows.
upd 14.0 <I> void

HideRow

(TRow row, bool del = 0, bool noshow = 0)
Hides the row from table, sets its Visible property to 0, sets its style display='none'.
If del = 1, deletes the row from html table (but not from data).
If noshow is 1, only sets Visible attribute, but does not hide the row.
Since 14.0 if del is -1 and the row has Expanded = 0 / 1, it sets Expanded to 2 / 3 and preserves visibility of the row's children.
Can be called also for solid and fixed rows.
new 12.0 API event bool

OnRowShow

(TGrid grid, TRow row, bool hide)
Called when the row will be shown (hide = 0) or hidden (hide = 1).
Return true to suppress the action.
new 12.0 <Actions>

HideRows ...FSARWO

Not assigned to any event
Hides actual or focused or selected rows.
new 12.0 deleted 15.0 <Actions>

HideRow

,

HideSelectedRows ...F

Not assigned to any event
Replaced by HideRows.
new 12.0 <Actions>

ShowRowAbove ...FSARO

Not assigned to any event
Shows hidden row above actual or focused row.
new 12.0 <Actions>

ShowRowBelow ...FSARO

Not assigned to any event
Shows hidden row below actual or focused row.
new 12.0 <Actions>

ShowRows ...FSRW

Not assigned to any event
Shows all hidden rows in focused range or selected ranges.
new 12.0 deleted 15.0 <Actions>

ShowAllRows

Not assigned to any event
Replaced by ShowRows.