TreeGrid XML

Rows

TreeGrid v5.9

TreeGrid documentation index

 

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

 

According to type are rows divided to data rows, space rows and special rows.

Data rows are standard rows structured to column sections and cells, containing values. They can be fixed or variable. Are set by <I> tag inside <Head>, <Foot> and <B> tags.

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

Special rows are all rows with special function, they can be fixed (<Filter>, <User>) or solid (<Group>, <Search>, <SimplePager>, <Toolbar>).

 

According to position are rows divided to variable, fixed and solid rows.

 

Variable (scrollable) rows are standard rows placed inside grid’s <Body> section to <B> pages and can be scrolled, paged, structured to tree, sorted, filtered, grouped. They can also be added or deleted.

Variable rows can be only data rows. Variable rows are base rows in TreeGrid.

 

Fixed (frozen) rows are placed to <Head> or <Foot> section above or bellow the <Body> section. They are still visible and cannot be scrolled.

They cannot be paged, structured to tree, sorted, filtered, grouped. They also cannot be added, deleted, only shown or hidden.

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 row and user row.

 

Solid (floating) rows  can contain html not divided to cell or can contain own cells with their own width not corresponding with columns. Their content is always visible and never scrolled. They have their own structure independent on columns. They can be placed above, bellow or between Head, Foot, Body sections and also horizontal scrollbar.

They are still visible and cannot be scrolled. They cannot be paged, structured to tree, sorted, filtered, grouped. They also cannot be added, deleted, 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.

Solid rows can also be special group row, search row, simple pager and toolbar.

 

 

Data rows

 

Data rows are all standard rows in grid except special rows. They contain cells. Can be variable or fixed. Are defined by <I> tag.

Variable rows are placed to pages (<B> tags). If grid does not use paging, all the variable rows are in one page.

The pages are placed inside <Body> section. Pages can be created automatically or by server, see paging.

Fixed rows are placed inside <Head> or <Foot> tag.

Data rows, <I> tags, also contain definition and values for individual cells.

Rows order in fixed sections (<Head> and <Foot>) is set by position of the <I> tags inside the section.

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.  

 

Default rows

 

Every row <I> has predefined attribute values in its default row <D>. The values from <D> are used when the row <I> has some attribute not set. If row has attribute set to empty value, the default value is not used.

Using defaults helps you to reduce data size and also to control adding and moving rows. But using defaults is not required.

Using defaults is good especially for trees with different levels, at least to differentiate tree nodes and data rows.

 

Defaults <D> are identified by their attribute Name. By this Name string are referenced from rows or other defaults by attributes Def or CDef.

 

Def attribute specifies default for the row itself.

You can use Def attribute even in <D> tag to reference another <D>. This means that you define <I> that references to its <D> that references to another <D>, that ...

If you don’t set Def attribute for any <D> or <I> tag the default is always <D Name=”R”>. Only for fixed rows is predefined <D Name=”Fixed”> that, of course, references “R” default too. This means that any attribute value not set in branch of <I> and <D> tags is at last read from “R” default.

Pay attention to cross-references among <D> tags.

 

CDef attribute specifies default for all immediate children rows, but only if they have not set their own Def attribute.

When dragging rows to children of the row, the parent row can accept only children rows with the same default as the parent row’s CDef.

When adding rows to children of the row, the new row will implicitly have default the same as parent rows’ CDef.

You can use CDef attribute even in <D> tag to predefine CDef attribute for all rows that use this default (the CDef attribute does not concern <D> tag itself, unlike Def attribute).

The CDef attribute can be also set in tag <Root>, this specifies default for all root rows. In this case (but in this case only), <Root> acts as parent for all variable root rows, including adding and dragging rows to root.

 

You can specify to row which default to use by many ways, all can be done in every case, but some are better for some cases and some for other cases.

Using Def attribute only is simpler but by CDef attribute you can control more. Remember, CDef attribute you can set even in <D> and <Root> tags too.

 

If you don’t use any Def or CDef attributes, all variable rows will have default <D Name=“R”> and fixed rows <D Name=”Fixed”>. These <D> are defined in basic file Defaults.xml. It means, if you don’t need to use defaults, you need not do it. You can change attributes of “R” or “Fixed” if you use <D> tag with this name in your data. New attributes you specify are merged or overwrite attributes specified in Defaults.xml => you don’t need to edit this file for every new grid.

 

Example of default rows

<Def>

                <D Name=’R’ Expanded=’1’ CanEdit=’1’ CDef=’R’/>            (it is default setting done in Default.xml, so this line is present only for learning purposes)

                <D Name=’Fixed’ CanEdit=’1’/>                                                  (it is default setting done in Default.xml, so this line is present only for learning purposes)

<D Name=’L1’ Expanded=’0’ CDef=’L2’/>

<D Name=’L2’ CanEdit=’0’/>       

</Def>

<Root CDef=’L1’/>

<Head>

                <I id=’H1’/>                                                        (has Def=Fixed, Expanded=N/A, CanEdit=1, CDef=N/A)

                <I id=’H2’ Def=’L2’/>                                      (has Def=L2, Expanded=N/A, CanEdit=0, CDef=N/A)

</Head>

<Body><B>

<I id=’R1’ Def=’L2’/>                                      (has Def=L2, Expanded=1, CanEdit=0, CDef=R => you can drag only R32 as its child)

<I id=’R2’ Expanded=’1’/>                             (has Def=L1, Expanded=1, CanEdit=1, CDef=L2 => you can drag R1, R31, R32 as its child)

<I id=’R3’>                                                         (has Def=L1, Expanded=0, CanEdit=1, CDef=L2 => you can drag R1, R31, R32 as its child)

                <I id=’R31’ CDef=’L1’/>                 (has Def=L2, Expanded=1, CanEdit=0, CDef=L1 => you can drag only R2 as its child)

                <I id=’R32’ Def=’R’/>                      (has Def=R,   Expanded=1, CanEdit=1, CDef=R=> you cannot drag any row as its child)

                <I id=’R32’ CanEdit=’1’/>               (has Def=L2, Expanded=1, CanEdit=1, CDef=R => you can drag only R32 as its child)

</I>

</B></Body>

 

 

 

<D>

Default row. From this row are filled all attributes in pointed row that are not explicitly set. This tag can only be in <Def> tag. See default rows.

 

string Name                  Name of the default. Required. To this name points row’s Def attribute to use this default.

                                               Predefined names (in Defaults.xml) are:

C” – default column for all columns, column cannot have the Def attribute. You cannot mix the “C” with other rows defaults.

                                                               “R” – default row for all rows and defaults without Def attribute and for all attributes not set in row and even in its default (s).

                                                               “Fixed” – default row for all fixed (head and foot) rows without Def attribute.

                                                               “Solid” – default row for all solid space rows without Def attribute. For backward compatibility its parent default is “Fixed”

                                                               “Group” – default row for all created grouping rows (rows automatically created when grouping rows).

                                                                              - in fact, any default with Group = ‘1’ is default for grouping rows, see paragraph bellow.

                                                               “GroupLast” – default row for the group on the last level in grouping tree, if needed to differ it from “Group”

string Def                         The default can also point to another default by specifying its name in Def attribute.

From this parent default reads all attribute values not explicitly set.

 

All other attributes are the same as in <I> tag. Except id attribute.

 

 

<D Group=’1’>

Default row for grouping. From this row are filled all attributes in rows created when grouping. It contains also attributes Name and Def and all other attributes in <D> tag.

By default there is only one default row defined in Defaults.xml named “Group” that is used for all created grouping rows.

How the appropriate grouping default row is chosen? When grouping starts:

all default rows with Group=’1’ and GroupCols attribute that passes the <Cfg GroupCols/> are chosen.

if any of these default rows have set GroupMain, this value is set to MainCol.

and grouping is done for every column in <Cfg GroupCols/>

                for every column is set default grouping row that has this column or its position in GroupCol. If no such default row, it is used <C GroupDef />. If no such default row, it is used <D Name=”Group”/>.

 

bool Group [1]                            This default can be used for grouping. Also when ungrouping all rows that have its Def set to default with Group=’1’ are deleted and their children are ungrouped.

string[!]  GroupCols [ ]       When this default will be used - if <Cfg GroupCols/> attribute contains any string in this array. The string can contain “*” as wildcard for any substring.

                                                               For example “|*B,C|*X*|A” means all grouping with the last two columns B,C or any grouping containing column ‘X’ or grouping by column A.

                                                               When GroupCols is not set, the default can be used for any grouping.

When GroupCols is empty, the default will never be used for grouping automatically.

                                                               When more than one default rows pass the actual grouping, any one will be used, which one exactly is undefined,

but always have precedence the defaults with GroupCols set and def named exactly “Group” is tested as the last.

string []  GroupCol [ ]          This default will be used only when grouping according to column in this (comma separated) array.

                                                               In the array can be listed column name or it position in <Cfg GroupCols/>. The position can be 0 for first, 1 second, -1 last, -2 last but one and so on.

string GroupMain [ ]          A column where the grouping tree will be displayed. Changes MainCol when this default is used.

When more than one default row passed the GroupCols (but not GroupCol!), the first with GroupMain attribute set is used for setting MainCol.

string Action [ ]                           Action run when this default is chosen by the GroupCols. The action is run only once per whole grouping.

When more than one default row passed the GroupCols (but not GroupCol!), only the first not empty Action is run.

Action has access to property Grid and Row (as the default row). For example Action=”Grid.Editing=0;” suppresses editing when grid is grouped by this default.

string ParentCDef [ ]           Changes CDef of parent node. To change adding and dragging behavior when grouped.

string [] EditCols [ ]               Comma separated list of columns that will be editable and will change all values in the group children.

                                                               In this list can be present only columns where the actual grouping results all values the same.

                                                               Can contain special value “Main” that means main grouping column that will be mirrored to column according to the grouping is done.

bool AggChildren [0]        1 - when row’s parent calculates some aggregate functions on its children, this row calculates its children instead of itself – behaves like its children was directly in its parent.

int cellMaxChars [0]            Maximum characters from strings to compare. It should be set only for string columns. It can be used to group by according to first few characters.

                                                               You can even group by the same column twice or more times with different MaxChars value to achieve creating tree according to individual characters.

 

 

<Root>

Parent row for all root rows. It is invisible; it just sets some attributes for adding and moving root rows like CDef. Can be only in <Grid> tag.

 

string CDef [“R”]                         The name of default for rows in root. See CDef in tag <I>.

bool CanSort [1]                      Root rows can be sorted

int AddParent [0]                 Where to add new children. 0 standard behavior, 2 adds always to the end.

 

 

<P>

For short formats only. Predefined list of attribute names for row pointed by Par attribute. This tag can only be in tag <Par>.

 

string Name                  Name of parameter. To this names points row by the Par attribute.

string List                        Comma separated list of row’s attribute names. Attribute names always use Internal format !

 

 

<B>

One page with variable rows. If Cfg.Paging is not 3 (Server) this is usually only one with all rows inside and without any attribute.

This tag can only be in tag <Body>, it is required tag. Attributes are used only when Cfg.Paging = 3 (Server).

 

string id []                          (Both letters lowercase !) Unique ID of the page. By this ID is page identified when downloading data for this page. Used only if Rows are not set.

                                               If set neither id nor Rows attribute, the page is identified by its position inside body. But this position can change if any page is deleted.

string Rows []               User string. If set, the page is identified by this string when downloading data for this page. It usually contain list of rows page contains.

                               It can also be used to specify different url for every page by using Page_Url with wildcard *Rows.

int Pos []                           Page position inside body (from 0), identifies page if id and Rows not set, used only in request.

string Name []              Name of page, displayed in pager. Can contain HTML code (coded).

string Title []                  Title of page, displayed in pager as tool tip. Pure text. The tooltip is displayed only for not active pages on pager.

string NameXY[]         There can be predefined names according to sorting. If these are set, the Name and Title are created from them.

                               These names specifies the first and last value on page in sorting columns

                               X is boundary  = 0 – both (both values are the same in this column), 1 – top, 2 – bottom. Can be used either 0 or 1+2.

                               Y is sorting column 0,1,2.

                               There are possible combinations of XY (separated by #):

10 => 20 # 10,11 => 20,21 # 10,11,12 => 20,21,22 # 00 # 00 | 11 => 21 # 00 | 11,12 => 21,22 # 00, 01 # 00, 01 | 12 => 22

                                               For example: Name00=’blue’ Name11=’100’ Name21=’154’ means that page shows all blue values from 100 to 154.

int Count [0]                Count of rows the page contains. It specifies height of the page when does not show rows yet. It is also result of count function in formulas

If not set, it is used <Cfg> PageLength value. Or for the last page is Count computed from <Cfg> RootCount and row count in other pages.

... cells with result of specific aggregate function on children rows in the column, for example <B Asum=’123.50’>, where A is column name ...

 

 

<I>

One row settings and data. Values of not set attributes are read from default specified by Def attribute or if not set, from <D Name=”R”>.

This tag can be in tags <Head>, <Foot>, <B>.

 

 

Main setting

 

string id []                          (Both letters lowercase !) Unique ID of the row. Usually required.

                                               The id is case sensitive. The id should contain only letters (a-z, A-Z), underscore ‘_’ and digits (0-9) and should not start by digit.

If this attribute is not set or generated, row cannot be identified and its changes cannot be updated to server. 

Therefore every editable row needs to have set its id. All rows ids must be unique among all row ids inside one grid.

The id can be generated from primary key attributes set by <Cfg> IdNames, see also FullId. The parts are separated by ‘$’.

See all ways to set or generate row ids in Row’s identification tutorial. See also all <Cfg> attributes for generating ids.

The row can be accessed from JavaScript API by method GetRowById.

string Def [“R”]              The name of default (<D Name=””>). From this default are read all attributes, cell values and attributes not explicitly set in this row.

                                               See default rows section.

string CDef [“R”]         The name of default for child rows. This value is used as Def attribute value for children, if they have not set its own.

                                               This value is also used as value of Def attribute for new child rows added to this parent.

                                               When dragging, the row can only accept children with their Def attribute with the same value as this CDef value.

                                               If the CDef is set to empty string, the row cannot accept any children (by adding or by dragging).

                                               See default rows section.

string Kind [“”]            A kind of the row. Obsolete, now it should be used only by API, to get Kind of row dynamically.

The Kind was changed in TreeGrid v4.7 to tag name of special row, like <I Kind=’Filter’/> => <Filter/>

string Class [“”]            Name of CSS style class to use for whole row, it is usually better to set cells ClassOuter or ClassInner.

string Color [‘’]            Predefined default background color for row, used instead of Default color. Absolute color like “200,255,255”.

string AlternateColor [‘’]               Alternate color used instead of global Alternate color. Relative color like “-10,0,-5”.

                                               It is used only when alternating is permitted – the Alternate is set to another color than “0,0,0”

string Par [“”]                 For short format only. The name of the <P Name=””> with list of attribute names set in the row text.

 

 

Row capabilities

 

int CanEdit [1]                         If row values can be edited. Can be set to 2 to enter edit mode as readonly – for Type=Lines shows scrollbars. See also <Cfg> Editing.

bool CanFocus [1]                 If row can be focused

bool CanDelete [1] If row can be deleted. Not applicable for fixed rows.

bool CanSelect [1]                 If row can be selected.

bool CanDrag [1]                   If row can be moved by mouse dragging. Not applicable for fixed rows. Fixed rows cannot also be drop target.

The row can be dropped only to children of row with the same CDef attribute as this row Def attribute.

By default are all CDef and Def attributes = “R”, so all rows can be dropped everywhere. See default rows and example.

int CanFilter [1]                     How row can be filtered (hidden) by any filter, bit array.

                                                               &1 – if row can be hidden by any filter

                                                               &2 – if row can be hidden if all its children are hidden (must be <Cfg> attribute FilterEmpty = ”1”).

bool CanExpand [1]           If row shows icon to expand / collapse. If set to 0, the row cannot be expanded or collapsed by user.

bool CanSort [1]                      If row’s immediate children can be sorted (to suppress sorting for root rows, you can set this parameter in <Root>)

int SortPos [0]                           If set, suppresses sorting of this row and places it always to specified position independently on sorting state.

                                                               Positive number places the row from beginning, negative number places the row from end.

                                                               Therefore rows with SortPos will be placed in this way: 1,2,3, ... ,all sorted rows without SortPos, ... , -3, -2, -1

                                                               If more rows have the same SortPos, they will be sorted inside them only.

bool CanCopy [1]                  If row can be copied by row’s panel copy button

bool CanGroup [1]                               If row can be grouped.

If set to 0 the row will not be moved to grouping row. But if contains children, all its children will be grouped inside.

                                                               In tree you can control by this attribute the level where will be grouping applied or even for every node you can choose different level.

When grouping, only the root rows are grouped.

If you want to group another level in tree, set CanGroup of the root (and next level(s)) rows to 0.

bool CanExport [1]             If row will be exported to Excel

 

 

Row state

 

The row state is usually set in uploaded data only, but can be also set in input data, especially in <Changes> tag.

 

bool Deleted [0]                         Row has been deleted and will be deleted from data when updating.

bool Added [0]                           Row has been added and will be added to data when updating.

bool Changed [0]                    Any row’s cell value has been changed. Which cell is specified by the cell’s attribute Changed.

int Moved [0]                              If and how row has been moved. 0 – no, 1 – to another position in the same parent, 2 – to another parent.

                                                               When sorting is enabled, the value 1 is not used.

string Parent []                           When moved or added, this is id of the new parent row or position of page (from 0).

string Next []                                 When moved or added, this is id of row before row have been added or “” if the row is the last in its parent.

string Prev []                                 When moved or added, this is id of row after row have been added or “” if the row is the first in its parent.

string Copy []                               This attribute is set when used ChildPaging=3 and row was created as deep copy of another row, the Copy is id of the source row

                                                               This attribute is set only if row has some children and they were not loaded from server yet (the row was not expanded yet).

                                                               The server script must provide deep copy of the children of source (Copy) node to children of this (id) node.

 

 

Calculations

 

bool Calculated [1]               Row is calculated, at least one of its cells contain Formula attribute. You must set the Calculated attribute, if the condition is fulfilled.

                                               See information about TreeGrid formulas.

                                               If you use some formula in not calculated column’s cell, you have to specify row’s CalcOrder attribute.

string [] CalcOrder []            If row is calculated, here is comma separated list of column names. In this order are row’s cells calculated. See description.

                                                               Set it, if some cells formulas are depended on another calculated cells from the row. If not set, alphabetical order is used.

                                                               As CalcOrder item you can use asterisk (*) to calculate all row’s children.

                                                               Or you can use asterisk with number (*1,*2,...) to calculate row’s children according to its CalcOrderX attribute.

                                                                              => you can divide calculation of children to more phases where you can calculate different cells.

string [] CalcOrderX[]        You can define more CalcOrder attributes, X is number value, for example CalcOrder1. See description.

                                                               This CalcOrder(s) you can reference in parent CalcOrder attribute by *X, where X is the CalcOrder number.

                                                               If you use such complex calculation order, you usually need to set Recalc attribute of all rows to 256,

to recalculate whole grid after change.

int Recalc [3]                               What to recalculate, if any value changed or row moves / is deleted / added. Binary mask.

1 – Row, 2 – Calculated parents, 4 – All parents, 8 – Immediate children, 16 – All children, 256 – All table

It must contain at least all bits as in cell’s Recalc parameters to ensure appropriate recalculations.

bool AggChildren [0]        1 - when row’s parent calculates some aggregate functions on its children, this row calculates its children instead of itself – behaves like its children was directly in its parent.

                                                                              It is usually set in group default.

 

... cells with result of specific aggregate function on children rows in the column if ChildPaging=3, for example <I Asum=’123.50’>, where A is column name ...

 

 

Master / detail relationship

 

string Detail []              Master grid attribute. It is the main attribute for master / detail relationship.

                Set it to id of detail grid where will be displayed the row’s children. This means that every can be displayed in any other grid.

See <Cfg> attributes Detail to control when will be displayed the row’s children in detail grid.

See Master / detail tutorial.

Master/detail relationship is done by this way:

                               The children (as in tree) of master row are displayed after focus/click/double click/expand in detail grid.

                               The children are still part of master grid’s data and are downloaded / uploaded by master grid.

                               For the detail grid you need to specify the layout with empty data or with user row displayed when no data is shown in detail grid.

                               The layout of detail grid does not need to be the same as of master grid; you can add or hide other columns,

but remember, uploading is done by master grid and only its columns are uploaded.

The rows can be dragged between master and detail grid.

                               One master grid can have more detail grids and one detail grid can have more master grids, but only one at a time.

                               The master and also detail grid can show data in tree, you can specify by Detail attribute which rows are shown as detail.

For classic master-detail relationship without tree you should specify MainCol=’’ and all master rows set Expanded=’0’.

You can also use CopyTo attribute if you have editable cell in master row linked to cell in detail.

With TreeGrid you can have more grids in master-detail relationship; one detail grid can be also master for another detail grid.

 

 

Context menu

 

string [!] Menu                            Context menu for all cells in the row. It is first character separated array of menu item names. They can contain any HTML code.

                                                               This popup menu is displayed when user right clicks to cell. After user selects menu item, the OnContextMenu event is called.

string [!] MenuIcons            The icons (left column) for context menu, first character separated array. It can contain any HTML code, not only images.

string MenuCaption         The caption for context menu.

 

 

Tree settings

 

bool Expanded [1]                Row is expanded, displays its children. If ChildPaging is set to 3, Expanded must be set to 0.

int Count [0]                                                Count of children rows the row contains. Used when ChildPaging is set to 3.

                                               Must be set to > 0 if you want to download children from server. It specifies height of the children after expand when downloading data.

                                               If you use ChildPaging=3 and set Count you also must set Expanded = 0.

int MaxChildren [300]     Maximal count of row’s children when used child paging (ChildPaging>=2).

                                                               If the count of children exceeds this limit, in row are created sub nodes that contain parts of the children list.

                                                               This means that if row contain 1000 children, there will be created four sub nodes with 3x300 and 1x100 children rows.

                                                               See also <Cfg EmptyChildPages> attribute. The text displayed in child page is in <Grid><Lang><Text Items=’...’/></Lang></Grid>.

int MaxChildrenDiff [20]           The children rows are grouped to sub nodes only if their count exceeds MaxChildren + MaxChildrenDiff.

                                                               To avoid creating sub nodes with 300 + 1 node or so.

string TreeIconX []                Custom icons for specified row state (icons for expand/collapse)

X = 0 – not expandable, 1 – last not expandable, 2 – expanded (+), 3 – last expanded, 4 – collapsed (-), 5 – last collapsed

the last row is last row inside its parent’s children – its line does not continue. 1,3,5 are not used when NoTreeLines=’1’

For example: <I TreeIcon2=’SpecialExpanded.gif’ TreeIcon4=’SpecialCollapsed.gif’/>

The height of the icon is always set to height of the row, the width is always value of <Img Tree/>.

int TreeIconLeftX [0]      Position in pixels of the custom icon in its image file, when the file contains more icons.

int TreeIconTopX [0]      Position in pixels of the custom icon in its image file, when the file contains more icons.

 

 

Other settings

 

bool Visible [1]                           Row is visible.

int Selected [0]                          Row is selected. Selected row is marked yellow. The row can be selected by user by clicking row panel’s O button or by pressing space.

                                                               Rows / cells can also be selected by mouse, see Selecting attribute.

                                                               If set Selecting attribute to 8, row can have selected only some cells, in this case the Selected attribute has value 2.

                                                               There can be more selected rows in the grid. Don’t confuse selected and focused row. The focused row is the only row with cursor.

int Height [0]                              (Minimal) row height in pixels. If it is not set (or set to 0), row has height of its content. Used only when VarHeight is 0.

                                                               When some cell in row is higher than others, you should set row’s Height to height of this cell to ensure all sections have the same height

int MaxHeight [0] Maximal height of row in pixels if used Type=Lines, Html, and editing for Img, Link. Value 0 is without limit.

                                                               The value must as high as to accommodate its content of standard single line types like Text or Int with their icons.

Otherwise the row height can be different in the section and grid layout breaks down.

int MinHeight [0]                  Minimal height of row in pixels if used Type=Lines, Html, and editing for Img, Link. Value 0 is without limit.

bool Spanned [0]                     If row contains any spanned cells (marked with Span attribute). For sorting see SortSpan attribute.

bool SortSpan [0]                   By default, the grid sorts spanned rows always according to value in sorted column, even if this is invisible due spanning.

                                                               You can set values in these columns for spanned rows to support sorting in way you want.

                                                               Or you can set SortSpan to 1 and row will be sorted always according to spanned column’s value.

                                                               Attention, for supporting such behavior in number type columns, you must set also <Cfg SortSpan=’1’> attribute.

int AddParent [0]                 Where to add new children. 0 standard behavior, 1 adds as parent row is focused, 2 adds like 1, but always to the end.

                                                               For example, if you set AddParent of all rows and Root to 2, every new row will be added to the end of table, to the root.

string NewId []                            Accepted only if server returns changed in <Changes> tag. New value of id to change.

bool NoColor [0]                     If set to 1, the row is not colored at all – you use css style background for the row. Used only if cell NoColor is not set.

bool NoColorState [0]      If  set to 1, does not change background color for changed, added, moved and deleted row

bool NoUpload [0] If set to 1 ignores changes in this row and does not upload them to server. See also NoColorState.

string Tip [ ]                                    Tool tip text displayed when mouse hovers this row. See also <Cfg TipStart>.

string TipClass [ ]                    CSS class used in tool tip tag

 

 

Data row cells

Cell value and settings can be set by two ways according to format used. Cells can be in tags <I>, <D>, <Filter>. In <Header> tag are cell values used for column captions, but other cell settings are ignored.

 

Formats

 

1) Internal and short formats – all cells settings are in row attributes. The attributes are named as column_name + attribute_name.

Cell values are in attributes named only column_name.

                Example:

                               <C Name=’c1’/> <C Name=’c2’/>

<I id=’r1’ CanEdit=’0’ c1=’xxx’ c2=’yyy’ c2CanEdit=’1’/>

2) DTD Format – each cell settings is in separate child tag <U N=’column_name’ ... /> with attributes named without prefix.

Cell value is in attribute V.

                Example:

<C Name=’c1’/> <C Name=’c2’/>

<I id=’r1’ CanEdit=’0’><U N=’c1’ V=’xxx’/><U N=’c2’ V=’yyy’ CanEdit=’1’/></I>

 

 

Values

 

string Value                                  Cell value in string. The Value is not attribute name, see formats above.

Floating point numbers use ‘.’ as decimal separator and no thousands separator.

                Date and time values are in number of milliseconds from 1.1.1970 00:00:00.000 (standard JavaScript Date.getTime()). See also GMT attribute.

                Date and time values can also be in English string format “mm/dd/yyyy hh:mm:ss”

                Enum values are as integer index from 0, but they can also be set as name of item in list.

string EmptyValue             If set, cell displays this HTML string when the value is empty, you can use it for info like “Enter your name here”.

string SortValue                    Cell value used for sorting and grouping, useful for special non editable cells like Html, Img, List, ... , see also OnGetSortValue event.

                                                               Now this value is used only when sorting string columns !

string SortDescValue       Cell value used for descending sorting, useful to set if you want to preserve row position, see also OnGetSortValue event.

                                                               Now this value is used only when sorting string columns !

string FilterValue                 Cell value used for filtering and searching, useful for special non editable cells like Html, Img, List, ..., see also OnGetFilterValue event.

                                                               Now for searching it is not used for Int and Float types and also not for SearchMethod = 2.

string CopyValue                 Cell value used for copying to clipboard by Ctr+C, see also OnGetCopyValue event

string ExportValue            Cell value used for export to Excel, see also OnGetExportValue event.

string PageNameValue Cell value used for creating page names in right side pager, see also OnGetPageNameValue event.

bool Range [0]                            If the cell accepts a range or more values. Usable especially in filter cell.

                                                               If set to 1, cell of type Int, Float and Date accepts more values separated by ‘;’ and range of values separated by ‘~’.

                                                               For example “1;3~7;12;16~33” or “1/1/2000~3/3/2000;1/1/2007”.

The characters ‘;’ and ‘~’ can be changed by <Lang><Format ValueSeparator=’;’ RangeSeparator=’~’/></Lange>

                                                               If set to 1, calendar component for selecting date supports selecting more dates or range of dates by mouse drag.

                                                               If set to 1, Defaults dialog supports selecting more values for any cell type (not only Int, Float, Date).

                                                               The range value should not be used as input for calculations.

                                                               Sorting of range value is done only according to the first value ascending and the last value descending.

                                                               Filtering is done only according to the first value.

                                                               Search and group treat the range value as string.

 

Permissions

 

int CanEdit                               Cell value can be edited. Order testing if cell can be edited is: cell (+default), row (+default), column(+default). The first value set is returned.

Can be set to 2 to enter edit mode as readonly – for Type=Lines shows scrollbars.

int CanFocus           Cell can be focused. Order of testing is the same as in CanEdit.

0 no, 1 yes, 2 yes, but only for editing – the cursor does not change its position

bool CanSort [1]                                Row’s immediate children can be sorted according to this column.

To suppress sorting for root rows, you can set this parameter in <Header>.

bool CanFilter [1]  If row can be filtered according to this column. Used only when column has CanFilter=’2’.

bool AcceptEnters [0]       For 1 the Enter key inputs LF character, for 0 the Enter key accepts changes and finishes editing. Set to 1 for multi line cells that can contain CR/LF characters.

 

 

Overridden column’s attributes

 

These attributes are by default se in <C> tag for all cells in the column, but for particular cells they can be re-defined.

 

string Type                                    Overridden column’s type

string Format []                        Overridden column’s format string

string EditFormat []           Overridden column’s format string for editing

string ExportFormat []   Overridden column’s format string for export to Excel

string EditMask []                 Overridden column’s mask string for editing

string MaskColor []             Overridden column’s MaskColor

string ResultMask []           Overridden column’s ResultMask

string ResultText []               Overridden column’s ResultText

string [!] Enum []                        Overridden column’s list of values for enum type.

string [!] EditEnum []           Overridden column’s EditEnum

string [!] EnumKeys []         Overridden column’s EnumKeys

int EnumType [0] Overridden column’s EnumType

string IntFormat [‘’]             Overridden column’s InttFormat.

string [] Related[‘’]                   Overridden column’s list of column names for related enumerations

string [] Refresh [‘’]  Overridden column’s list of column names to refresh after the cell value is changed

string Button []                          Overridden column’s Button.

int WidthPad [0]                   Overridden column’s WidthPad.

string ButtonText ['']           Overridden column’s ButtonText.

type [!] Defaults []                    Overridden column’s Defaults.

string [!] Menu                            Overridden column’s Menu

string [!] MenuIcons            Overridden column’s MenuIcons

string MenuCaption         Overridden column’s MenuCaption

bool OverflowEllipsis [0]             Overridden column’s OverflowEllipsis

 

 

 

Style and display

               

string ClassOuter [‘’]           CSS class name of cell outer div tag, default is GCell or GCellNE, if cell is editable or not. See styles.

string ClassInner [‘’]            CSS class name of cell inner content, default is according to type, for example GNumber or GText. See styles.

string ClassEdit [‘’]                CSS class name of cell inner content when editing, default is according to type, for example GINumber or GIText. See styles.

string ClassEnum [‘’]          Overridden column’s ClassEnum.  CSS class prefix, used for custom Enum type when EnumType > 1.

string HtmlPrefix [‘’]           Html code added before value

string HtmlPostfix [‘’]        Html code added after value

string Color [‘’]                           Predefined default background color for cell, used instead of Default color.

                                                               Remember, the resulted color is computed from this color plus (negative) row state colors.

                                                               The resulted individual color parts (r,g,b) should be in range 0-255, therefore use there color parts in range 128-255.

                                                               The color “255,255,255” is transparent color, so it displays background color of its parent if no state color is computed.

bool NoColor [0]                     If set to 1, the cell is not colored at all – you use css style background for the cell.

bool Visible [1]                           If set to 0, the cell content is not displayed (the button if any is still visible). It can be set also for Panel.

 

 

Spanning

 

int Span [0]                                   For spanned cell, how many cells it covers, at least one. The row with spanned cell must have set Spanned=’1’.

                                                               In the whole spanned column is shown value of this column. It can be changed by Merge and MergeStart attributes.

The columns containing spanned cells cannot be dragged, see <C> CanMove and Group attributes.

int Merge [0]                               For spanned cell (cell must have set Span attribute and row Spanned attribute).

                                                               The count of columns; their values are displayed subsequently in the cell. 0 means not used.

                                                               This attribute is ignored in export to Excel.

int MergeStart [0]                For spanned cell (cell must have set Span and Merge attributes and row Spanned attribute).

                                                               The first column in spanned range; its value will be displayed, 0 means this column, 1 next, ...

int MergeEdit [0]                  For spanned cell (cell must have set Span and Merge attributes and row Spanned attribute).

The column in spanned range; its value will be edited, only one column from spanned range can be edited.

int MergeType [0]                Various flags for merging, bit array.

                                                               1.bit (&1) 0 – merged cells are displayed in one line (horizontally), 1 – merged cells are displayed on more rows (vertically)

                                                               2.bit (&2) 0 – if column is hidden, its cell value is removed too,

   1 – all merged cell values are always visible regardless of column visibility.

 

               

Calculations

 

string Formula []                     Formula to compute cell’s value. If formula of any cell in the row is set, the Calculated attribute must be set too.

int Recalc []                                 What to recalculate, if value changed. Binary mask. Overrides row’s Recalc parameter.

1 – Row, 2 – Calculated parents, 4 – All parents, 8 – Immediate children, 16 – All children, 256 – All table

string sum, count, ...              In <B> tag for Cfg.Paging=3 or <I> tag for Cfg.ChildPaging=3, result of aggregate function on children rows in the column.

 

 

Actions

string Event.... []                       You can specify for a cell any TreeGrid event and action for it. The event name is full event name with prefix and target.

                                                               This action is called before the standard TreeGrid action for the event. When this action returns true, the standard action will not be called.

                                                               Events still bubble, so the events are called in this order: cell event, standard event, cell parent event, standard parent event, ....

                                                               If you want to call this action after the standard action and only when it failed, define parent event instead.

                                                               If you want to only suppress the standard TreeGrid action for the cell, set the event value to “1” (as the success of empty action).

                                                               For key events is the action raised when this cell is focused and user presses the key.

Use actions with F postfix. In custom JavaScript code you can use FRow and FCol properties. Like if(Grids[0].FCol==’Col3’) {...}

                                                               For mouse events is the action raised when this cell or its part is accessed by mouse.

Use actions without F postfix. In custom  JavaScript code you can use ARow and ACol properties.

                                                               For example:

                                                                              EventEnterEdit = “AcceptEdit”

                                                                              EventClickCell = “SelectCell OR SelectRow”

EventCtrlClickDefaults=’alert(“There are no default values for the cell!”),1’

                                                               The cell events can be easily changed from API by row[col+”Event”+name] = “new action string”;

 

string Action []                           JavaScript code run after editable cell is changed or Button type cell is clicked.

                                                               This attribute has no relation with predefined TreeGrid actions and these actions cannot be called here!

It is run in formula (TCalc) content, so it has access to other row attributes according to their names and to actual cell by properties Grid, Row, Col, Value.

Here you can also call aggregate or special calculations functions like sum, choose or split.

                                                               The Action is especially intended to use in solid space rows to build toolbars or set settings and do actions like grouping and searching.

 

 

Other settings

 

bool ShowHint []                   Overridden column’s ShowHint - Cell values that are not fully visible are displayed as hint while mouse is above the cell

string Tip [ ]                                    Tool tip text displayed when mouse hovers this cell. See also <Cfg TipStart>.

string TipClass [ ]                    CSS class used in tool tip tag

string ToolTip []                       Tool tip text displayed as title (as plain text), only if column has attribute ToolTip set to 1. Uses HTML TITLE attribute.

                                                               Obsolete, use Tip / ShowHint instead.

string Error []                              If set it means that cell contains invalid value. The cell is colored red and as tool tip is displayed the Error string.

bool Selected [0]                       If the cell is selected, can be set only if the row has Selected = 2. If row has Selected = 1 it means that all cells are selected.

string[] CopyTo []                    List of cells where to copy this value after value is changed. Used usually in master / detail relationship. See Detail attribute.

                                                               It is comma separated list: row1,col1,row2,col2,... row is row id, col is column name

                                                               row can also be these special words:

Parent – parent row, Next – next sibling, Prev – previous sibling, Children – all children

                                                                              Children_X – All children with specified default as X

Child_X – specific child, if X is number, it means child on specified position (from 0)

                                                                                              if X is string it means the first child with specified default (Def attribute).

                                                                              Sibling_X – specific sibling, it is the same as Child_X, but relative to parent row and not to this row.

bool DefaultsServer [0]   If set to 1 TreeGrid downloads the Defaults list from server side by <treegrid> Cell_Url settings before it displays it (after the button was clicked).

                Example:              Let’s have row MyRow with cell MyCol with Defaults button:

<I id='MyRow' MyColButton='Defaults' MyColDefaultsServer='1' ...

                                               Set in your TreeGrid definition:

<treegrid Cell_Url='myscript.jsp' Cell_Data='MyData' ...

                                               And the myscript.jsp (or .aspx, .php) will get such XML in MyData property:

                                                               <Grid> ... <Body> <B id='MyRow' Col='MyCol'/> </Body> </Grid>

And the myscript should return XML to update the Defaults list in the appropriate row cell:

<Grid> <Changes> <I id='MyRow' MyColDefaults='the prepared list'/> </Changes> </Grid>

bool EditServer [0]               If set to 1 TreeGrid downloads the cell settings from server side by <treegrid> Cell_Url settings before it starts cell editing.

                                                               You can use it for example to change cell type to enum and download enum list from server side.

                                                               It is used similarly to DefaultsServer

 

 

 

Solid space rows

 

Solid space row is not divided to column sections, is still visible and never scrolled. It is placed to table between other rows sections.

Cannot be sorted, filtered, selected, deleted, added or dragged. Cannot have child rows. Cannot have spanned cells (it has no meaning, you can define all the cells, positions and widths)

Solid rows are not exported to Excel.

Can be hidden and displayed by Visible attribute or by ShowRow / HideRow API methods.

Can be calculated, the Formula must be set for individual cells. Can run Action after cell change or button type cell click. Cells can be focused and/or edited.

Solid space rows can be used as various control panels, result rows and so on.

Solid space row can contain cells, that have not the same layout as grid columns, but rather have its own width and position. Those cells are not affected by columns resize or move. The name of cells can but don’t need to be the same as column names. The list and order of cells is set by Cells attribute.

Space rows have the same row attributes and cell attributes as data rows.

By space rows are done special rows Group, Search, SimplePager and Toolbar.

Space row can be placed in <Solid> tag as the <I> or <Space> tag. The position in grid is set by its Space attribute.

For backward compatibility it can be placed also to <Head> and <Foot> tags and also can be marked as <I Kind=’Space’/>.

 

Special row attributes for solid space rows

(Other row and cell attributes are the same as in data rows)

 

int Space [2]                                 Position of the row inside grid, specifies horizontal section of the grid.

                                                               If more solid rows has the same Space value, are placed in the order they are in data

                                                               0 – above header, 1 – under head rows, 2 – above foot rows, 3 – under foot rows, 4 – under vertical scrollbar, 5 – under toolbar

0, 4, 5 are spanned for whole grid, including vertical scrollbar and pager, other are spanned only for columns.

string Tag [“”]                               If set, the id of html tag where to render the row outside the grid. In trial version this attribute is ignored

To move space row inside the grid, use Space attribute instead.

string [] Cells [“”]                         List of cells in the row, the cells are the same as data row cells, only they have to set its Width attribute,

so they do not correspond with column widths. Default Width of all cells is 100.

string Html []                                Html code displayed in the row if Cells is not set – the row is not divided to cells and just displays this Html code.

                                                               ! Remember, the Html has white space wrapping enabled by default, so to display the code at one line only you should use &nbsp; or prohibit wrapping.

int Height [0]                              Row height in pixels. If it is not set (or set to 0), row has height of its content.

string Class [“GSpace”]             CSS Class name used for the row

int Panel [0]                                  If the row displays (disabled) panel, just for the same look as other rows. If set to 2, it displays the panel even if the whole panel column is hidden.

int RelHeight [0]                    Relative height for the space row in % of the rest of the empty space. Use it to fill by this row the empty space.

It is ignored when set NoVScroll = ’1’.

                                                               You can also use MinHeight and MaxHeight attributes to better specify the height

                                                               ! If you use RelHeight, do not set height of main tag in percent !

int MaxHeight [0]                Maximal height of row in pixels if set RelHeight attribute. Value 0 is without limit.

int MinHeight [0]                  Minimal height of row in pixels if set RelHeight attribute. Value 0 is without limit.

 

Special cell attributes for solid space rows

(Other row and cell attributes are the same as in data rows)

 

int Width [100]                           Width of the cell in pixels. If not set, it uses the width of column if exists otherwise it is 100

 

Button type cell attributes

Action button (Type=”Button”) displayed usually on Toolbar or any other Space row.

It can be used also as tabber page or main menu.

string Icon                                      Button HTML caption – any HTML displayed on image button, can contain <img> tag for example. It is used only when Caption is not set.

string IconChecked            HTML caption displayed when is button checked – the cell value is 1. When is not set, the Icon is displayed for any cell value.

                                                               Remember, you can define Formula for the cell to check/uncheck the button according to some grid state.

string Caption                          Button caption – when set, it is displayed as standard <button> instead of image button with Icon.

string ToolTip                          Standard browser TITLE displayed for that button

string ToolTipChecked                Tooltip displayed for checked button

string ClassInner                  You can define class for the checked and unchecked button.

For example when set ClassInner=’Cls’, Cls class will be used for unchecked button and ClsChecked for checked button.

int Width                                     Width of the button, when not set, its width will be variable according to its Icon/Caption.

int Height                                    Height of the button parent, when not set, its height will be set to <Img ToolbarHeight/>.

string Formula                        The button can have set its Formula to calculate its checked state. The formula should return 0 or 1.

string Action                               Action called after button click. See cell Action. It is not standard TreeGrid event action!

string ReloadData               Url or data to reload body from here when button is clicked.

                                                               It can be direct XML (starting with <) or tag id of existing tag (input) to use its value or URL.

                                                               It replaces Data_Url / Data_Tag / Data_Data and reloads body of TreeGrid.

                                                               The data must contain only <Body> tag and not layout definition.

string[!] Menu                             Menu displayed after click to button. The items can contain HTML like Icon attribute.

                                                               After selecting some menu item its Actions item is called.

                                                               When set Tab, the selected menu item also replaces the button caption and the button is set as checked.

string [!] Actions                       The actions called after click to menu item. See cell Action. It is not standard TreeGrid event action!

string [!] ReloadData          For Menu set is the ReloadData parsed as array.

int Tab                                            Tab group number. When set to > 0, the button behaves as tab inside tabber of buttons with the same Tab number.

                                                               Only one button inside group can be checked – checking one unchecks all others.

 


Special rows

 

Special rows are all other than data and space rows: <Filter>, <User>, <Group>, <Search>, <SimplePager>, <Toolbar>.

Filter and User rows are standard fixed rows, divided to sections and placed to <Head> or <Foot> section.

Group, Search, SimplePager and Toolbar are solid space rows, not divided to sections and placed to <Solid> section

 

 

Fixed special rows

 

<User>

Fixed special row with no special function to show custom html code. It is divided to sections (left, variable, right), where the variable section can be horizontally scrolled.

It is usually replaced with <Space> row that is similar but solid and with more functionality.

The advantage of User row to Space row is that User row is placed to <Head> or <Foot> section between other fixed rows.

It can be placed in <Head> or <Foot> tag.

For backward compatibility it can be placed also to <Solid> tag and also can be marked as <I Kind=’User’/>.

 

string LeftVal []                        String displayed in Left column section

string MidVal []                        String displayed in Variable column section

string RightVal []                    String displayed in Right column section

int RelHeight [0]                    Relative height in % of the rest of the empty space. Use it to fill by this row the empty space to fill the whole main tag by grid.

                                                               You can also use MinHeight and MaxHeight attributes to better specify the height.

                                                               ! If you use RelHeight, do not set height of main tag in percent !

int MaxHeight [0]                Maximal height of row in pixels if set RelHeight attribute. Value 0 is without limit.

int MinHeight [0]                  Minimal height of row in pixels if set RelHeight attribute. Value 0 is without limit.

 

 

<Filter>

Fixed special row with user interface for filtering rows according to particular column(s) like in standard filter in MS Excel.

It is divided to cells like the standard data row.

It can be placed in <Head> or <Foot> tag. The <Filter> row is usually only one, but there can be also more filter rows placed to <Head> and / or <Foot> tags.

For backward compatibility it can be placed also to <Solid> tag and also can be marked as <I Kind=’Filter’/>.

 

It can have the same row and cell attributes like standard fixed data row <I>.

Cell settings like Type or Format are inherited from the column setting, like standard data row cells.

By default can be filtered only types: Bool, Int, Float, Text and Lines. The filtering is done according to filter cell Type. So, if you want to do string filtering in Int column or want to filter in Html column, just redefine Type in filter cell to “Text”.

 

See also <Cfg> attribute FilterEmpty and StandardFilter.

In tree filter by default hides all rows that do not fulfill the condition. Opposite, to show all rows that fulfill the condition set <Cfg StandardFilter=’2’/>.

 

Special cell attributes for filter row:

 

string Filter [0]                            Selected filter. This value is overridden by settings from cookies.

                                               Can be one of predefined filters: “0” – Off, “1” – Equal, “2” - Not equal,

“3” - Less than, “4” - Less than or equal, “5” = "Greater than, “6” - Greater than or equal,

“7” – Begins with,  “8” – Does not begin with, “9” - Ends with, “10” – Does not end with, “11” – Contains, “12” – Does not contain

int FilterType [0]                   The way of filtering strings, the same as column’s SortType attribute, bit array: bit 1 reserved,

bit 2 (&2) – 1 = localized sorting, see also CharCodes property.

bit 3 (&4) – 1 = case insensitive, bit 4 (&8) = ignore white chars given by WhiteChars attribute.

int DefaultFilter [1/11]      Predefined filter operator, it is automatically selected when filter is off and user changes cell value.

                                                               Default value is for Text type 11 and for other types 1. See Filter attribute.

                                                               If set to 0, no automatic selection is done.

int FilterOff []                          Only for Enum type. Item index that sets filter off. Usually set to 0 as the first item.

                                                               When set, the filter Enum attribute must contain one (this) item more than the standard Enum.

                                                               For example: <C Name=’A’ Enum=’|A|B|C’/> ... <Filter AFilterOff=’0’ AEnum=’|Off|A|B|C’/>

bool ShowMenu [1]             If filter menu icon is visible. You can hide it to use only DefaultFilter and usually Defaults button to select one value for filter.

int [] MenuItems [...]            Comma separated array of operators displayed in FilterMenu, can contain numbers from 0 to 12 in any order.

For possible values see Filter attribute.

                                                               Default value varies according to cell type, Bool = “0,1”, Int, Float, Date, Enum = “0,1,2,3,4,5,6”, other = “0,1,2,3,4,5,6,7,8,9,10,11,12”

bool Range [0]                            The cell accepts more values or value ranges to be filtered by.

                If set to 1 for cell of type Int, Float and Date, it accepts more values separated by ‘;’ and range of values separated by ‘~’.

                               It can be used only for filter operators 1 (Equal) and 2 (Not equal). Other operators will fail.

                               It will filter all values inside the range(s), including boundaries.

                               For example Equal 1;3~5;9~12;16 will find cells with values 1,3,4,5,9,10,11,12,16

                If set to 1 for cell of string type like Text or Lines, it accepts more values separated by ‘;’.

                               It can be used only for filter operators: 1 (Equal), 2 (Not equal), 7 (Begins), 8 (Not begin), 9 (Ends), 10 (Not end), 11 (Contains), 12 (Not contain)

The characters ‘;’ and ‘~’ can be changed by <Lang><Format ValueSeparator=’;’ RangeSeparator=’~’/></Lange>

                If set to 1, calendar component for selecting date supports selecting more dates or range of dates by mouse drag. The date should not contain time part.

                If set to 1, Defaults dialog supports selecting more values for any cell type (not only Int, Float, Date).

 

 

 

Solid space special rows

 

<Search>

Solid special row with user interface for searching and advanced filtering in grid.

It is not divided to any section and is never scrolled. It can contain any cells like Space row, but the cells listed bellow have special functions.

To more customize searching and advanced filters in grid you can define all the user interface by Space row cells instead of Search. See this tutorial.

It can be placed in <Solid> tag. The position in grid is set by its Space attribute.

For backward compatibility it can be placed also to <Head> and <Foot> tags and also can be marked as <I Kind=’Search’/>.

 

string [] Cells [Expression]         The Search row can have these predefined cells, the cells can have standard cell and space row cell attributes, like Width or ToolTip.

                               Expression - the expression to search for or advanced filter formula, standard input cell type Text. Its Action attribute can have special values.

                               Filter, Select, Mark, Find, Clear, Help – buttons to raise standard search action. Clear restores original state, Help shows help message.

                               Actions – select box with standard search actions to select one that will be run by Search button or after Expression changes and its action is set to Actions.

                                               Its Action attribute can have special value “Refresh” to repeat search in grid after another value is selected.

                               Search – button to raise search action selected by Actions combo.

                               List – select box with predefined values for SearchExpression. To let user just select predefined filter or search instead of building own.

You have to set Expressions and Defaults attributes.

                               Cols – select box to select which columns will be searched through. You have to set Cols and Defaults attributes and optionally Label attribute.

                               Defs – select box to select which rows (according to its default row) will be searched through.

You have to set Defs and Defaults attributes and optionally Label attribute.

                               Case – check box to choose case sensitive (1) or case insensitive (0) search. Sets SearchType, 3. bit. Has optional attribute Label.

                               Type – check box to choose to search in rows (0) or in individual cells. Sets SearchType 1. bit. Has optional attribute Label.

string ExpressionAction []          Search action done after the Expression cell value changed, can be Filter, Select, Mark, Find, Actions or Last.

Use Actions value if cell Actions is included in Cells. Use Last to run the last action previously done.

string ActionsAction []                    Search action done after the Actions select box is changed, can be Refresh – repeats search with the selected action.

string [!] ListDefaults []                     First character separated array of item names to display in List cell.

string [!] ListExpressions []          First character separated array of predefined expressions that will be assigned to SearchExpressionafter specific item in ListDefaults will be selected.

string [!] ColsDefaults []                    First character separated array of item names to display in Cols cell.

string [!] ColsCols []                                               First character separated array of column names that will be assigned to SearchCols after specific item in ColsDefaults will be selected.

string ColsLabel []                                Label displayed in front of the Cols combo, in fact it is displayed in cell named ColsLabel, so you can also set other attributes for ColsLabel cell.

string [!] DefsDefaults []                    First character separated array of item names to display in Defs cell.

string [!] DefsDefs []                                First character separated array of default row names that will be assigned to SearchDefs after specific item in DefsDefaults will be selected.

string DefsLabel []                                 Label displayed in front of the Defs combo, in fact it is displayed in cell named DefsLabel, so you can also set other attributes for DefsLabel cell.

string CaseLabel []                               Label displayed in front of the Case checkbox, in fact it is displayed in cell named CaseLabel, so you can also set other attributes for CaseLabel cell.

string TypeLabel []                              Label displayed in front of the Type checkbox, in fact it is displayed in cell named TypeLabel, so you can also set other attributes for TypeLabel cell.

int Panel [1]                                                 If the row displays panel, to show icon for enabling / disabling searching. If set to 2, it displays the panel even if the whole panel column is hidden.

 

 

 

<Group>

Solid special space row with user interface for grouping data rows according to the same values in selected column(s).

It is not divided to any section and is never scrolled. It can contain any cells like Space row, but List cell and Custom area have special functions.

The group row can be also done by pure Space row with the cells Select and DropCols. See this tutorial.

It can be placed in <Solid> tag. The position in grid is set by its Space attribute.

Note: when grouping, created grouping rows have default row “Group”, to change this settings see <D Group=’1’/>.

For backward compatibility it can be placed also to <Head> and <Foot> tags and also can be marked as <I Kind=’Group’/>.

 

string [] Cells [“List”]                   The Group row can have two special cells, List and Custom. These cells have also all other attributes as standard space row cells.

string[!] List []                                First character separated array of predefined grouping names. It can contain HTML code.

                                                               If it is empty, no cell with predefined grouping will be displayed.

                                                               This list has the same format as list for Button of type Defaults.

string ListCustom []            Value displayed in List cell for custom grouping not in Cols. It can contain HTML code.

string[][!] Cols []                           First character separated array of comma separated arrays of column names as predefined GroupCols for defaults in List.

                                                               Example:              List=”|Group by A|Group by A, B and C|Group by C and D”

                                                                                              Cols=”|A|A,B,C|C,D”

                                                                                              Types=”|0|0,0,32|32|48”

int[][!] Types []                            First character separated array of comma separated arrays of grouping types (GroupTypes) for Cols array.

bool Custom [1]                        If the custom grouping is permitted – if the drop area for column captions is displayed, cell type DropCols named Custom.

                                                               The text displayed in the area “To group by, drag column caption here...” can be changed by

<Grid><Lang><Text GroupCustom=””/></Lang></Grid>, default located in Text.xml.

int Space [1]                                 Position of the row in grid, specifies horizontal section of the grid.

                                                               If more solid rows has the same Space value, are placed in the order they are in data

                                                               0 – above header, 1 – under head rows, 2 – above foot rows, 3 – under foot rows, 4 – under vertical scrollbar, 5 – under toolbar

0, 4, 5 are spanned for whole grid, including vertical scrollbar and pager, other are spanned only for columns.

int Panel [1]                                  If the row displays panel, to show icon for enabling / disabling grouping. If set to 2, it displays the panel even if the whole panel column is hidden.

 

 

 

<SimplePager>

Solid special row with user interface for paging. Shows simple pager with links to all pages in horizontal row. Still can be displayed also standard vertical pager.

It is not divided to any section and is never scrolled. Now it cannot contain any cells.

It can be placed in root <Solid> tag. The position in grid is set by its Space attribute.

For backward compatibility it can be placed also to <Head> and <Foot> tags and also can be marked as <I Kind=’Pager’/>.

 

int Space [4]                                 Position of the row in grid, specifies horizontal section of the grid.

                                                               If more solid rows has the same Space value, are placed in the order they are in data

                                                               0 – above header, 1 – under head rows, 2 – above foot rows, 3 – under foot rows, 4 – under vertical scrollbar, 5 – under toolbar

0, 4, 5 are spanned for whole grid, including vertical scrollbar and pager, other are spanned only for columns.

string HtmlPrefix []             Text displayed in front of pages’ links. It can contain inline tags only.

string HtmlPostfix []           Text displayed behind pages’ links. It can contain inline tags only.

 

 

<Toolbar>

Solid special row with user interface for toolbar with buttons, formula on toolbar and icon for resizing grid.

It is not divided to any section and is never scrolled. It can contain any cells like Space row, but the cells defined bellow have special functions.

It can be placed in root <Grid> tag or in <Solid> tag. The position in grid is set by its Space attribute.

For backward compatibility it can be placed also to <Head> and <Foot> tags and also can be marked as <I Kind=’Toolbar’/>.

It can be defined also by simple <Space> row, except the icon for resizing. See this tutorial.

string [] Cells [“Save,Reload,Repaint,Print,Export,Add,AddChild,Sort,Calc,ExpandAll,CollapseAll,User,Columns,Cfg,Help,Styles”]                Toolbar have predefined many buttons.

                All the buttons are visible by default, but only if its action has sense in actual grid configuration, for example if adding is forbidden, the Add and AddChild buttons are hidden.

                There is special cell name Styles, if included, it will add switch for all available TreeGrid styles. To display it, there must be set also Styles=’1’.

bool Save, Reload, Repaint, Print, Add, AddChild, Sort, Calc, ExpandAll, CollapseAll, Columns, Cfg, Styles, Help [1]   Visibility of button. Obsolete, define the Cells array instead.

bool Styles [0]                              Show all style buttons on toolbar to let a user change TreeGrid style. Only <Style> with Caption set will be listed.

                                                               The Styles item must be also listed in Cells array.

string Tag [“”]                               If set, the id of html tag where to render the toolbar, if there is need to show toolbar outside the grid. In trial version this attribute is ignored

You can render toolbar outside the grid or even inside the grid to another location.

To move toolbar inside the grid, use Space attribute instead.

                ! Remember, if you move the toolbar, the resizing of whole grid will not be accessible, see ResizingMain.

int Space [5]                                 Position of the toolbar in grid, specifies horizontal section of the grid. 0 – above header, 1 – under head rows, 2 – above foot rows, 3 – under foot rows, 4 – under vertical scrollbar

bool Visible [1]                           If toolbar is visible. In trial version this attribute is ignored.

string Formula [“”]                 Standard formula that’s result will be displayed on the right on toolbar. It is calculated as for calculated fixed row.

                                                               The result is Html cell, so the formula can return HTML code.

                                                               You can use this formula to show any custom text on toolbar or for example count of all rows, filtered rows and so on.

                                                               It is used for backward compatibility, now you can define any custom calculated toolbar cell.

string FormulaCol [“”]      Column for that will be formula calculated, by default is used main column if present or first visible column.

int Copy [7]                                  Specifies items for copying in menu displayed for Add button

Bit array - &1 – can copy row, &2 – can copy tree data, &4 – can copy tree structure => 7 for all options. It affects only options in action CopyMenu.

int ColumnsCount [1]    Count of columns the columns select menu will be divided, use if there are too many columns in grid.

                                              

                              

 

 

 

 

 

 

 

 

 

Updates

 

3.2

Added <I> attributes LeftVal, MidVal, RightVal. Cell attributes Button, ButtonText.

 

3.5

Added <B> attribute NameXY

 

3.6

Excluded from file TreeGridDataFormats.htm to TreeGridDataFormatReference.htm

 

3.8

Updated <B> attribute Count

Added cell attribute ToolTip

 

4.0

Added new cell Type “Lines”. Added <I> attributes MaxHeight, MinHeight.

Updated attribute CanEdit

Cell attribute Rows is now obsolete.

Added new cell Types “Link” and “Img”

Added cell attributes EditMask, MaskColor

Added <I> attribute Spanned

Added cell attributes Span, Merge, MergeStart, MergeEdit

Added <I> attribute CanExpand

Added <I> attributes RelHeight

Added new cell Type “List”

 

4.0.3

Added <I> attribute SortSpan

 

4.1

Added new cell Type “Radio”

 

4.2

Added <I> and <Header> AddParent attribute

Added <I> attribute FilterType

Added cell attributes ClassOuter, ClassInner, ClassEdit, HtmlPrefix, HtmlPostfix

Added cell attribute Visible

Updated <I> Class attribute

Added cell attributes SortValue, SortDescValue, FilterValue and CopyValue

 

4.3

Added <I> and cell attribute Color

Added <I> CanCopy attribute

Added cell attribute Defaults

Added cell attribute ExportFormat

Added cell CanFilter attribute

Updated <I> attribute CanFilter

 

4.4

Added cell attribute EditEnum

Updated Radio cell type

Updated <I> attribute Selected and added cell attribute Selected.

Updated <I> CalcOrder attributes

Added <I> Detail attribute

Added cell CopyTo attribute

Added cell MergeType attribute

Added <I> attribute Prev

 

4.5

Added <I> attribute CanGroup

Updated <I> Kind attribute, added value “Group”

Added <I> attributes for grouping rows: List, ListWidth, ListCustom, Cols, Types, Custom

Added cell attributes DefaultFilter and ShowMenu

Added <I> attribute MaxChildren and MaxChildrenDiff

Updated <I> attribute Kind, added new value “Space” and added <I> attributes Space, Panel, Html

Updated <I> Kind attribute, added value “Pager”

Added <I> attributes HtmlPrefix, HtmlPostfix

Added cell attribute ExportValue

 

4.5.4

Added cell, <I> attributes Menu, MenuIcons, MenuCaption

 

4.6

Added cell attribute EnumKeys

Updated <D> attribute name, new value added “GroupLast”

 

5.0

Excluded from file TreeGridDataFormatReference.htm to TreeGridXmlRows.htm

Restructured

Added section Solid space rows

Added section Special rows

Updated <I> attribute List

Added <I> attribute NewId

Added <I> attribute NoColorState

Added <Space> attribute Cells

Added <I> attribute NoUpload

Added <I> and cell attributes NoColor

Added cell attribute Action

Moved <Toolbar> from TreeGridXmlCfg.htm

Added cell attribute AcceptEnters

Updated SortValue and FilterValue

 

5.0.7

Added cell attribute DefaultsServer and EditServer

 

5.1

Added <I> attribute CanExport

Added <D> attributes GroupCols, GroupCol, GroupMain, EditCols

Added to CopyTo attribute special word Children

Added <I> and <D> attribute AggChildren

 

5.5

Added <I> attribute SortPos

Added <D Group=’1’> MaxChars attribute.

Added cell attribute PageNameValue

Added cell attribute EmptyValue

Added <Filter> MenuItems cell attribute

Added to <Toolbar> Cells item Styles and attribute Styles

Added Cell attribute Event...

 

5.5.4

Added new predefined default name “Solid”

Updated MaxHeight description

 

5.6

Added cell and filter cell attribute Range

Added <Toolbar> Copy attribute

Added <Space> Tag attribute

Added cell attribute ShowHint

Added <I> and Cell attributes Tip and TipClass

Cell attribute ToolTip marked as obsolete

Added <I> attribute Height

Added <I> attribute TreeIcon, TreeIconLeft, TreeIconTop

Updated cell attribute CanFocus

Added <I> attribute AlternateColor

Added cell attributes EnumType and ClassEnum

Added filter attribute FilterOff

 

5.6.4

Added Space Button type attributes

 

5.7

Added Cell attribute OverflowEllipsis

 

5.8.2

Added Toolbar attribute ColumnsCount