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 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 <I> void

ShowRow

(TRow row, bool noshow = 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.
Can be called also for solid and fixed rows.
<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.
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>

HideRow ...F

Not assigned to any event
Hides actual or focused row.
new 12.0 <Actions>

HideRows ...F

Not assigned to any event
Hides focused rows. Version without ...F fails if the actual cell is not focused.
new 12.0 <Actions>

HideSelectedRows ...F

Not assigned to any event
Hides selected rows. Version without ...F fails if the actual row is not selected.
new 12.0 <Actions>

ShowRowAbove ...F

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

ShowRowBelow ...F

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

ShowRows ...F

Not assigned to any event
Shows all hidden rows in focused range. Version without ...F fails if the actual cell is not focused.
new 12.0 <Actions>

ShowAllRows

Not assigned to any event
Shows all hidden rows in grid.