TreeGrid XML data format reference

TreeGrid v4.6

Attributes of XML Tags

Basic description of TreeGrid XML format is at TreeGrid XML format description.

Description of all attributes in all tags. This notation uses C syntax, but of course in XML are all values strings.

string is value from any visible characters. int is integer number. bool is boolean value 0 or 1 (not false and true !).

int type can be bit array every bit has its own meaning (0 not set, 1 set). For example number 9 is binary 1001 => 1&8.

string[], int[], bool[] is comma separated array of given type A,B,C.

string[!], type[!] is first character separated array of given type you can separate values by any character you want, but no array item can contain this character. This character must be passed as first character |A|B|C or ,A,B,C.

In [ ] after attribute name is default value from file Defaults.xml.

Floating point numbers use . as decimal separator and no thousands separator. Dont use zeroes, if they are not required, instead of 020.00 use 20.

Date and time values are in English notation (mm/dd/yyyy hh:mm:ss).

Date and time values can be also set as number of milliseconds from 1/1/1970 00:00:00.000 (standard JavaScript Date.getTime()). This format is preferred for large grids. Set also Cfg.Prepared = 1 to speed up loading.

You can set any other custom attributes or even tags and use their values in formulas or in your own JavaScript functions and event handlers.

<IO> Request or server response. If error occurred, this is usually the only tag returned. If there were no error or warning, this tag is usually missing.

int Result General result of server response, 0 means OK, >0 OK with warning, <0 Error, sent data were not accepted.

string Message Server response message, if set, this text is alerted to user, independently on Result value.

int Reload Some data needs to be reloaded. 0 No reload needed,

1 reloads body (useful to regenerate pages for server paging when pages was changed on server)

string ReloadMessage If set in server response, shows confirm dialog before reloading, to confirm this action by user

string UpdateMessage If set in server response, shows confirm dialog before updates changes received from server to grid, to confirm this action by user

It can be used especially when used checking for updates function.

string Session Sent to server from client, was read from <treegrid> tag. It identifies server session.

It can be sent from server to client to change this parameter.

Remember, the IO is not sent to server if method <treegrid *_Method=Get> is used.

By default the Session value is not persistent, therefore if user reloads page, the Session value is lost.

You can let TreeGrid to store Session value to hidden input or to cookies by SaveSession attribute.

<Img> Images settings, image files and sizes. Change them only if you want to use another or custom image set. See changing images.

string Style [G] Prefix for all class names, predefined sheets have these prefixes:

Grid.css G, GridLight.css GL, GridBigger.css GB, GridGame.css GG.

string Grid [Grid.gif] Image file with all grid icons except toolbar icons

int Height [17] Height of all icons in grid except toolbar icons, in pixels

int Line [21] Width of all tree straight line icons

int Tree [26] Width of all tree ending icons

int Panel [13] Width of all left panel icons

int Sort [14] Width of all sorting images in header

int Filter [17] Width of all filter images

int Row [17] Width of all row content images (checkbox, calendar)

string Toolbar [Toolbar.gif] Image file with all toolbar icons

int ToolbarHeight [16] Height of all toolbar icons

int ToolbarWidth [25] Width of all toolbar icons

string DragOne [DragOne.cur] Cursor file. This mouse cursor is displayed when dragging one row or column

string DragMore [DragMore.cur] Cursor file. This mouse cursor is displayed when dragging more rows.

<Colors> Cell background colors settings. These colors are used to show row state.

All values are in format R,G,B, R = red (0-255), B = blue(0-255), G = green(0-255)

Remember, the resulted color is sum of base color and all relative colors according to row/cell state.

The resulted values R,G,B must be in range (0-255)

See also setting colors for individual cells or rows by attribute Color.

Base (absolute) color

Default ["255,255,255"] Base color for all cells. This color can be changed also by cell Color or row Color attribute.

Fixed (absolute) state colors, these colors are not modified by any other colors

FocusedCell ["90,255,255"] Cell with cursor (on position FRow, FCol)

EditedCell ["255,220,255"] Cell with cursor (on position FRow, FCol) in edit mode (EditMode = 1)

ViewedCell ["255,238,255"] Cell with cursor (on position FRow, FCol) in edit mode (EditMode = 1), for cells with CanEdit = 2

Alternate (relative) row color

Alternate [] Alternate color for odd rows (or rows with order position divisible by AlternateRepeat value)

Using alternate coloring can slow down filtering and sorting because table must be re-colored.

In tree the children always starts from position 0 for coloring

AlternateRepeat [2] For each row with order position divisible by AlternateRepeat is added Alternate modifier color.

When used paging, set PageLength to number divisible by AlternateRepeat to preserve coloring order.

Relative state colors

Focused ["-25,-25,-25"] Focused row (on position FRow), all cells except FocusedCell.

CannotFocus ["-15,-15,-15"] Row or cell cannot be focused, with CanFocus=0

ReadOnly ["-11,-11,-11"] Row or cell cannot be edited, with CanEdit = 0

Hovered ["-5,-5,-10"] Row under mouse cursor (on position ARow) when Hover=2. All cells except HoveredCell.

HoveredCell ["-25,-10,0"] Cell under mouse cursor (on position ARow, ACol) when Hover=2.

Selected ["0,0,-128"] Selected row, row with Selected = 1.

Detail [0,-15,0] Row in master grid that will be expanded to detail grid, in master/detail relationship

DetailSelected [0,-15,-30] Row in master grid actually expanded into detail grid, in master/detail relationship

Relative state colors, for more states used only the first color in this order

Error ["0,-150,-150"] Cell with invalid value marked by server, Error=1

Deleted ["0,-50,-50"] Deleted row, row with Deleted = 1, only when deleted rows are visible by ShowDeleted=1.

Added ["-50,0,-50"] New add row, row with Added = 1

Moved ["-40,-20,-20"] Row moved to another parent, row with Moved = 2

ChangedCell ["-50,-50,0"] Cell with value changed

Changed ["-20,-20,0"] Row with some cell value change, all cells except the changed cells. Row wit Changed = 1

Other

ChildPage [0,0,-15] Automatically created grouping row in tree, if children count of the row exceeds the MaxChildren limit.

<Cfg> Grid settings

Main settings

string id [...] Unique ID of created TreeGrid on the page, under this name will be stored configuration to cookies.

By this name can be TreeGrid accessed from JavaScript code, as Grids[id].

It is also ID of <TABLE> tag where grid is rendered. This tag replaces <TreeGrid> tag.

Default value is TableX, where X is grid index, from 0, in order grids are created

int Version [0] Version of data. Grid loads cfg from cookies only if version is the same as saved.

Change this number whenever data structure (especially number of columns, column names and types) changes.

int MainCol [0] Main column with tree, empty for pure grid without tree

Paging

int Paging [0] Method of paging used. This paging is only for root rows, best for pure grids or trees with many root nodes.

0 None. All rows are in one page, pager cannot be visible. All rows are rendered on start. This means slow start and fast use.

It is good for small grids, up to about 500 rows in root.

1 Show all. Pages are automatically created but all are rendered on start. For AllPages = 1 is the same as None but with pager enabled.

For AllPages = 0 is the same as Auto. It is good for medium grids, 250 1000 rows in root.

2 Auto (Client) Pages are automatically created.

For AllPages = 1 is page rendered only when is visible in window by scrolling for 500ms.

For AllPages = 0 is page rendered immediately but is visible only one page at a time and after switch to another is re-rendered.

It is good for large grids up to 10 000 rows. All functions still works offline, include sorting, filtering and calculations.

3 Load (Server) Pages are created by server and TreeGrid downloads only page being displayed.

The server is responsible for sending data for requested page and also for sorting and filtering.

Calculations are still possible offline on client, but must be prepared on server.

It is good for very large grids, with more then 10 000 or for grids with special relations or grids need be online.

For server application you can use TreeGrid.dll/so.

If you are not able to do sorting, filtering or grouping on server and you still want to use these features,

you can set OnePage attribute (and AllPages=0) to do them partially in actual page.

int ChildPaging [2] Method of paging of children rows in tree.

0 None. All rows, including all children are rendered on start. This means slow start and fast use.

2 Auto (Client). Rendered on start are only children of expanded rows. Children of collapsed parent are rendered on first access.

This means faster start for collapsed tree, but slower first expanding of collapsed node.

3 Load (Server). Children of collapsed row are downloaded at first expand. Server must be able to send the children of the row.

For server application you can use TreeGrid.dll/so.

int PageLength [20] Average count of rows in page. For client paging there are all pages created to contain this number of rows (except the last).

For server paging it determines height of page it is default value of <B> Count attribute.

Exact count of rows in pages can differ due to adding or deleting rows or in last incomplete page.

This value is returned as part of result of count ( ) function in formulas.

Every page must contain at least one row or is deleted. Exception is when grid does not contain any row, but must contain one page.

In TreeGrid server is this parameter used to set count of rows in page.

int PageLengthDiv [1] Page length divider for very large tables (>250 000 root rows) with AllPages==1 and FastPages>0.

This divides PageLength to display smaller non rendered pages.

Set this attribute to your rows count / 200 000. For 1 000 000 set it to 5. In this case set PageLength to be enough, for example to 100.

This attribute is used due problems in some browsers with too high tags (in IE there are problems with tags higher then 5M pixels).

int RootCount [] Count of all rows in root. Used to compute Count parameter of last page when server paging used and pages have not Count attribute set.

bool NoPager [0] If set to 1, does not render pager. The pager cannot be shown by user. Also does not pre-calculate page names.

TreeGrid server does not generate page names and does not send page names to client.

int FastPages [0] For large tables (> 50 000 root rows). Set it to default value of 100 to speed up rendering of large tables.

Bigger value speeds up initial rendering, but can slow down TreeGrid usage and vice versa.

int PageTime [500] How long (in ms) must be page visible (by scrollbars) before it loads data or renders (for AllPages=1).

int OnePage [0] If set, sorts, filters or groups rows only in actual page. Only when AllPages = 1 (one page visible at a time).

Bit array: 1. bit (&1) sorting, 2. bit (&2) filtering, 3. bit (&4) grouping. Set to 7 for all actions done at one page only.

Use this attribute especially for server paging (Paging=3) if you are not able to do sorting, filtering or grouping on server.

Creating and generating id

string [] IdNames [id] Comma separated list of attributes fully identifies the row, these attributes are like unique primary key in database table.

The list can contain column names, attributes like Def or any user defined row attribute.

The last attribute in list is specific, because its value is generated automatically for new rows from IdChars, IdPrefix and IdPostfix.

The row id attribute is automatically created from the attribute values from the list, separated by $.

If any value contains $, it is replaced by _.

If the list item is editable column and its value is changed there is possibility that the id will not be unique.

In this case the last attribute value is re-generated (before changes are sent to server).

After changes are sent to server, the row id is updated according to changed attribute (column) values.

When new row is added, the last attribute value is generated to ensure the id to be unique.

Remember, if the list contains more items the last attribute must not be id, because the row id attribute gets the result.

bool FullId [0] If set to 1, row id contains its parent id as prefix, separated by $.

For example if parent id is A$3, the row id can be A$3$B$7.

When row is moved to another parent, the last attribute from IdNames can be regenerated to ensure id to be unique.

bool AppendId [0] If set to 1, the generated id (the last attribute in IdNames) is appended to existing value.

When new row is add, the cell gets default value for cell and if it is not unique, new id is appended to value.

When user changes the id cell (the last from IdNames), to the end of new value is appended id if the value is not unique.

string LastId [] Last (maximal) id when used server paging, because TreeGrid cannot generate new ids if does not know all row ids.

Can be used only when IdNames contains only one item!

New generated id (of new added row) will get next id.

If IdPrefix and / or IdPostfix are used, this attribute must start with IdPrefix and end with IdPostfix

string IdChars ["_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"] Accepted characters when generating new id. In this order.

Example: if the last id was ab the next id is ac, for az is ba for zzz is ____

int NumberId [0] Set to 1 for generating number ids. This attribute says, that id cannot start with count of NumberId characters from start of IdChars.

string IdPrefix [] This string is inserted before generated new id (before the last part).

string IdPostfix [] This string is appended at the end of generated new id.

int IdCompare [0] How to compare ids if they are unique. Bit array, 3.bit (&4) case insensitive compare. Other bits reserved.

Remember if use case insensitive ids, the IdChars cannot contain both type letters (A, a).

Grid capabilities

int Editing [1] How values of grid can be edited, 0 never, 1 yes, according to other settings, 2 preview (read only) mode

bool Deleting [1] Rows can be deleted

int Selecting [7] How rows and/or cells can be selected, bit array

1. bit (&1) if selecting is permitted

2. bit (&2) - row can be selected by Ctrl + click,

3. bit (&4) rows / cells range can be selected by Shift + click. The range is between focused cell and clicked cell.

If focused row / cell is selected, the whole range is unselected, otherwise is the whole range selected

4. bit (&8) individual cells can be selected, if set, grid supports selecting cells instead of whole rows

Row with selected only some cells has Selected=2 and selected cells have its attribute Selected=1

5. bit (&16) rows / cells range can be selected by Ctrl + mouse dragging. The range is between focused cell and actual cell.

If focused row / cell is selected, the whole range is unselected, otherwise is the whole range selected

6. bit (&32) if set, whole selection is cleared after focus change

bool Adding [1] Rows can be added

bool Sorting [1] Rows can be sorted

bool Dragging [1] Rows can be moved by mouse

bool Copying [1] Rows can be copied by toolbar button (+).

bool ColResizing [1] Columns can be resized. Remember, column resizing is slow.

bool ColMoving [1] Columns can be moved by mouse dragging. Inside its section only (LeftCols, Cols, RightCols)

int ResizingMain [0] If set, main tag can be resized by user by dragging by bottom right edge of toolbar.

= 1 resizes vertically (height), 2 resizes horizontally (width), 3 resizes both sides

Extents of main tag are saved to cookies, to suppress it set ResizingMainLap=1.

bool SuppressMessage [0] Grid is silent, does not display messages

bool Silent [0] If set to 1, the grid produce no sounds

Grid configuration, used only at first time or when Version changes or when SuppressCfg=1or when ...Lap = 1

If you need to overlap saved cfg for any parameter, set attribute ...Lap to 1 (for example for SortCols set SortColsLap = 1)

bool Sorted [0] Sorting is enabled by user

bool AutoSort [0] Row is sorted if value is changed after edit

string [] SortCols [] Array of column names (comma separated), according to them are rows sorted, in this order. Max 3 columns.

If the first column(s) in this array have set Visible=0 and CanHide=0, an user cannot change sorting for these columns

and they will stay the first forever use this case to predefine some sorting behavior.

int [] SortTypes [] Array of sort types (comma separated) for every column in SortCols, bit array: bit 1 (&1) 0 DESC, 1 ASC, other bits reserved

string [] GroupCols [] Array of column names (comma separated), according to them are rows grouped, in this order.

Remember, to use grouping you have to place to fixed rows one row with Kind=Group.

int [] GroupTypes [] Array of grouping flags (comma separated) for every column in GroupCols, bit array:

bit 5 (&16) do not create grouping row for empty or zero values

bit 6 (&32) do not create grouping row for single values.

other bits reserved

string GroupMain [] Column where to show tree when rows are grouped. Used only for plain tables; for grids is used always MainCol.

bool Calculated [1] Calculating is enabled by user

bool AutoUpdate [0] If true, after any change, sends changed data to server

bool ShowDeleted [1] Shows deleted rows (in red). For true are deleted still visible and can be undeleted.

int Hover [1] What blinks under mouse cursor. 0 nothing, 1 border (caption, panel, ...), 2 border and cells

int SortIcons [1] How sorts and shows icons. 0 hides icons and sorts by click to cell, 1 shows icons and sorts by click to cell, 2 sorts by click to icon

bool ShowDrag [1] Shows dragged object under mouse cursor

bool HidePanel [0] Rows left panel is hidden by user

bool AllPages [1] When paging enabled, shows all pages at once and renders page on demand, when displayed by scrolling.

For false shows one page at a time and switches to pages only by pager click.

bool ColsLap [0] Overrides saved configuration for column positions and widths, if set this settings from cookies is ignored.

bool ColsPosLap [0] Overrides saved configutarion for column positions, if set this settings from cookies is ignored.

bool FilterLap [0] Overrides saved configuration for filters, if set this settings from cookies is ignored.

bool PagerWidthLap [0] Overrides saved configuration for pager width, if set this settings from cookies is ignored.

bool CheckUpdatesLap [0] Overrides saved configuration for Interval for checking updates.

bool MaxHeight [0] If set, updates height of main tag to fill the whole window, the page must have floating (not absolute) layout.

By resizing grids main tag must be resized page body, the main tag must not be included in table or inside any tag with absolute extents set.

Cannot be used when ResizingMain is set to 1 or 3.

Is possible to have more grids on page (vertically) with MaxHeight set, in this case their height is computed as ratio of their MaxHeight value.

bool MaxWidth [0] If set to 1, updates width of main tag to fill the whole parent tag or body. Cannot be used when ResizingMain is set to 2 or 3.

Use it to fill parent tag width if there are more tags with float style attribute.

Advanced grid configuration

bool SuppressCfg [0] Does not use any client settings in cookies (0 uses, 1 does not load, 2 does not save, 3 nothing)

int PersistentCfg [0] If set to 1 or 2 uses persistent browser cache instead of cookies for saving configuration.

The persistent cache can store much more data, at least one megabyte (shared among all pages).

This persistent cache is only in IE (userData behavior) and Firefox 2.0+ (globalStorage property).

Due bug in Firefox 2.0, the persistent cache is not used when running locally on protocol file://.

0 use cookies, 1 use persistent cache if available otherwise use cookies, 2 use only persistent cache, if available.

bool SaveExpanded [0] If set to 1, saves expanding / collapsing state of all rows to cookies. All rows must have set id attribute.

Remember, cookies are limited to 4096 bytes for the whole page, so use this setting only for very small tables or use PersistentCfg.

and also use the smallest ids as possible (the amount of space is used: id+1 bytes per row)

bool SaveSelected [0] If set to 1, saves Selected attribute of all rows to cookies. See restrictions at SaveExpanded.

bool SaveValues [0] If set to 1, saves all changed values of all rows to cookies.

Remember, cookies are limited to 4096 bytes for the whole page, so use this setting only for very small static tables or use PersistentCfg.

and also use the smallest ids and column names as possible (the amount of space is used: (name+1)+id+value+2 bytes per row).

Also use it only for number tables or restrict strings by edit mask.

string SaveSession [] If set to id of hidden input, it stores Session attribute value to this input to be persistent for page reloading.

Only some browsers preserve input values for page reloading.

The hidden input must be placed to page in HTML and not by JavaScript. Also dont place it into TreeGrid main tag.

If set to 1, saves Session attribute value to cookies. It saves Session regardless of values of SuppressCfg and Version.

This attribute should not be set in data xml, only in layout.

Settings for building data and debugging

bool DebugCalc [0] Set it to 1 to see all errors in calculations. Set it only when debugging not in release data.

Many errors are caused by syntax errors in formulas or when any input value is null or by missing CalcOrder.

bool AlertWidths [0] If set to 1, alerts all column widths after grid render. Use to find out actually set widths to set predefined widths in data.

Master / detail relationship

bool Detail [0] Detail grid attribute. Set it to true for grid used as detail grid.

To show master rows children in detail grid you need to set its Detail attribute.

int DetailOn [0] Master grid attribute. When to show data in detail grid.

0 disabled, 1 on focus to row, 2 on click to row, 3 on double click to row

int DetailExpand [0] Master grid attribute. What to when expanding row marked as detail.

0 show it in detail grid only, 1 expand it only,

2 show it in detail grid and also expand it the children will be on two places in two copies and changes will be done to both.

Handling empty numbers and dates

string EmptyNumber [] A value displayed and returned if cell type Int or Float contains empty value.

By default this attribute is not set at all it means that all empty values are displayed and formatted as 0

and TreeGrid does not differ between empty values and zeroes.

If this attribute is set to any value, even to , this value is displayed for all empty values

and TreeGrid differs between empty values and zeroes except these few cases:

when sorting; when filtering with operator >=, >, <, <=;

string EmptyDate [] A value displayed and returned if cell type Date contains empty value.

By default this attribute is not set at all it means that all empty values and zeroes (GMT 1/1/1970 00:00:00) are displayed as empty.

and TreeGrid does not differ between empty values and zeroes takes them as zeroes.

If this attribute is set to any value, even to , this value is displayed for all empty values and zeroes are displayed as standard date

and TreeGrid differs between empty values and zeroes (GMT 1/1/1970 00:00:00) except these few cases:

when sorting; when filtering with operator >=, >, <, <=;

Other settings

string HelpFile["Help.html"] Path and filename of TreeGrid help.

bool Prepared [0] Prepare grid to speed up loading grid. If prepared, date-time values are set as count of milliseconds from 1/1/1970 00:00:00.000.

Set Prepared to 1 for large grid and also if grid does not contain date-time values.

int CacheTimeout [5] How long TreeGrid waits for all images complete loaded, in seconds.

If the timeout expires, TreeGrid alerts warning and continues rendering.

int DateStrings [0] If set to 0 (default), Date values are uploaded as numbers (milliseconds from 1/1/1970),

If set to 1, Date values are uploaded as strings in English format (M/d/yyyy HH:mm:ss).

If set to 2, Date values are uploaded as strings in JAVA format (yyyy-MM-dd HH:mm:ss).

bool EnumKeys [0] Set it to 1 to use columns EnumKeys attribute for converting enum values.

bool NoFormatEscape [0] If set to 1, you can use HTML tags in columns Format string, in prefix and postfix for text and anywhere for numbers.

bool AcceptEnters [0] If set to 1, pressing Enter key textarea inserts new row as usual in HTML. To finish editing is possible by Alt+Enter or Ctrl+Enter.

Enter always inserts LF only (&#x0A).

bool VarHeight [0] If set to 1, the rows can have different height. This height is automatically computed according to highest cell in the row.

Set it to 1, when you want to use multi line textarea (cell type Lines) or you include to cells various HTML code.

Variable rows height is not recommended to use with Paging (Child paging is mostly ok).

Setting to 1 can slow down grid rendering and also grid images may not fit in rows.

int RowHeight [18] Average height of row if VarHeight is 1. This value is used to pre-compute page height and some other settings.

string Focused [ ] Id of focused row. When used server paging, it can be id or position of page with focused row and FocusedPos is used too.

int FocusedPos [0] Position of focused row at page when used server paging.

string FocusedCol [] Name of focused column

bool StaticCursor [0] If set to 1 grid does not hide cursor when looses focus after click outside grid

bool NoScroll [0] If set to 1, does not use TreeGrids scrollbars. In this case are used scrollbars of main tag or browser window.

If set to 1, you can control scrollbars by setting style overflow of main tag, set it to visible to resize main tag to show whole grid

or set it to auto or scroll (and set height and width of the main tag) to use scrollbars of main tag.

bool NoHScroll [0] If set to 1, the TreeGrid always resizes horizontally the main tag to show all the grid.

bool NoVScroll [0] If set to 1, the TreeGrid always resizes vertically the main tag to show all the grid.

bool HideRootTree [0] Hides the first line in tree (root items are without any line)

bool NoTreeLines [0] If set to 1, does show connecting lines in tree, just expand / collapse buttons

bool FilterEmpty [0] If set to 1 when filtering, hides all rows with CanFilter=2 that have all children hidden

bool StandardFilter [0] By default is filter applied to parents before to children to speed up filtering.

If set to 1, applies filter to children before filtering parent. Use it if parent is filtered according to visibility its children,

when uses aggregate functions. It can be much slower.

string [] CalcOrder [] Global calculation order for fixed rows if you have more fixed rows and want calculate cells in fixed rows at random

If set it is used instead of CalcOrder attribute in fixed rows.

In this array you can point to individual cells by id$col,

for example F1$A,F2$C,* calculates cell [F1,A], next [F2,C] and next all variable rows.

bool NoScrollAfterExpand [0] If set to 1, does not scroll into view the rows children the icon stays under mouse cursor

string BaseUrl [0] String added before urls in types Img and Link, if their format specifies it.

bool SortSpan [0] If set to 1, grid supports SortSpan attribute in <I> for number columns.

bool ReversedSortIcons [0] If set to 1, the sort icons for ascending and descending sorting are swapped

int MaxSortColumns [0] Maximum columns according to can be grid sorted (1-3). It affects only sorting icons.

string PrintPrefix [] HTML code added in front of TreeGrid when printing

string PrintPostfix [] HTML code added behind TreeGrid when printing

string PrintCSS [] Url of CSS style sheet for printing used instead of default CSS style sheet

bool InEditMode [1] If set to 1, the edit mode is run when user clicks any editable cell

If set to 0, the edit mode is run only when user clicks to focused editable cell or double clicks some editable cell.

bool ReSort [0] Output attribute only. This attribute is filled in Request XML as request for re-sorting grid after sorting has been permitted by user.

bool ReCalc [0] Output attribute only. It is filled in Request XML as request for re-calculating grid after calculations have been permitted by user.

int MaxGroupLength [300] Maximal count of immediate children in grouped row. If the count is higher, the grouping row is divided to more rows.

bool EmptyChildPages [0] Used when the count of children exceeds MaxChildren value and in row are created children pages.

If the child page row shows all values of its parent [0] or shows only value in main cell [1].

int ExportType [2] The way of simple export to Excel, binary array - &1 export also filtered rows, &2 export also children of collapsed rows.

int Keys[0] Controls various keys, bit array.

1.bit (&1) if set, gray (numeric) + and writes character to input instead of accepting / canceling input.

<D> Default row or column. From this row are filled all attributes in pointed row or column that are not explicitly set. This tag can only be in <Def> tag.

string Name Name of the default. Required. To this name points rows Def attribute to use this default.

See also chapter Names and IDs. 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.

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

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.

Other attributes are the same as in <I> or <C> tag, depends for what it is default. Except id attribute.

<Panel> Rows left panel settings. This tag can only be in <Grid>.

bool Visible [1] If the panel is visible. The panel can be hidden also by Cfg.HidePanel attribute. To suppress loading from cfg you can use VisibleLap=1.

bool Select [1] If the button Select is visible. This button is hidden also if Cfg.Selecting attribute is 0.

bool Delete [1] If the button Delete is visible. This button is hidden also if Cfg.Deleting attribute is 0.

int Copy [0] If the button Copy is visible. This button is hidden also if Cfg.Copying attribute is 0.

Bit array - &1 can copy row, &2 can copy tree data, &4 can copy tree structure => 7 for all options

You can use OnRowCopy event to control what values will be copied in which option

<C> One column settings. Values of not set attributes are read from default <D Name=C>. This tag can be in tags <LeftCols>, <Cols>, <RightCols>.

Column position grid is according to its position in parent tag. This is used only for first display on client or when Cfg.Version changes, otherwise is column position read from cookies. Column caption is set in tag <Header>.

Base attributes

string Name [] Column name. Required. By this name are accessed cells in this column. See also chapter Names and IDs.

string Type [text] Column type:

Bool boolean value 1 and 0 in HTML is displayed as checkbox

Int integer number in HTML is displayed as formatted text according to Format string. See also formatting numbers.

when editing, this is displayed in <INPUT type=text> and is formatted according to EditFormat string

when editing, only valid keys are accepted, the other are ignored.

Float floating point number, other is same as in Int type.

Enum enumeration index to array Enum. In HTML is displayed string from Enum array on position given by this value.

when editing, displays <SELECT> with items from Enum array with this value as selected index.

the enumeration can be used for special sorting, when you need to have non standard order.

If you want to mix selection from list and direct value edit, use rather Button of type Defaults instead of Enum type

Radio enumeration by radio buttons. In HTML there are displayed radio buttons.

There are two modes of radio buttons controlled by the first value (base flags) of Format array (5. bit, &16)

In the first mode the only one radio can be checked at one time. You can also choose if all radios can be unchecked.

In this case the value is integer index of checked radio, from 0.

In the second mode more radios can be checked.

In this case the value is bit array of checked radios. (1,2,4,8,16,...)

Texts displayed next to radio buttons are given in Format string.

See also formatting radio buttons.

Date date and/or time. In input data is this value number of milliseconds from 1.1.1970.

the value is displayed as formatted text according to Format string. See also formatting date and time.

when editing, this is displayed in <INPUT type=text> and is formatted according to EditFormat string

when editing, there is displayed button on the right in the cell to show date picker to select date from calendar (Button=Date)

Text string is displayed as text and when editing in <INPUT type=text>. This is default type. See also formatting text.

Pass password, it is displayed as ***, when editing is displayed in <INPUT type=password>

for now passwords are sent not coded

Lines Multi line text, edited in <TEXTAREA>. To use this type, the <Cfg> attribute VarHeight must be set to 1.

If set <Cfg> attribute AcceptEnters to 1, the row changes its height to show all content of this cell.

To include CRLF in data for textarea, you need to use entities &#x0D; and/or &#x0A;.

If you use AcceptEnters, use only LF (&#x0A)!

Maximal and minimal height of the row can be set by <I> attributes MaxHeight and MinHeight.

If set MaxHeight for read only cell is good to set its attribute CanEdit to 2 to let user see all content.

See also formatting text.

Img Image. Cell value contain array of values, first character is separator: |image_URL|width|height|left|top|link_URL|link_window,

where image URL is URL with picture to display,

width, height, left, top are used to display only part of the image, all values must be set or all must be left empty

link URL is link to page displayed after click to image

link_window is browser window name where the link will be opened, for new window set _blank

Example: |/img/test.gif|100|100|0|200|/test/test.html or |/img/test2.gif or |/img/test.gif|||||/test/test.html

See also formatting images.

Link Link to any url. Cell value contain array of values, first character is separator: |Url|Text|Window

where Url is the link url

Text is a text to display, if is empty the Url is displayed instead

Window is browser window name where the link will be opened, for new window set _blank

See also formatting links.

Html Any HTML string displayed as is. This can contain also image or link, but without any support of editing and so on.

Avoid the tags <U> and <CENTER> to better compatibility with TreeGrid.

Remember, if you include your XML data directly to your HTML page, you have to use double coding of XML entities:

character < in TreeGrid value is &lt; in XML data and &amp;lt; in HTML page.

List List of items to build an html string. The value contains the array of items, separated by the first character.

The values are merged together using Format. The result can be any HTML code.

See also formatting lists.

string Format [] Format string, how to display value. Varies according to cell Type.

If you want to add HTML formatting before and after value, use cell attributes HtmlPrefix and HtmlPostfix.

For numbers and dates is format string the same as in function ToString ( ) in Microsoft .NET.

See all formats description.

string EditFormat [] Format string for editing. See description.

string ExportFormat [] Number and date format for export to Excel. It is in Excel format not in TreeGrid or ASP.NET format! Used only for Export_Type = 0.

If you dont know the format for the cell, create xls file with one cell, specify its format you want and save it as web page (html file).

Open this htm file and search style property mso-number-format.

Editing masks

string EditMask [] Mask for editing. This can be any regular expression (RegExp string).

A user can write only characters that fulfill the EditMask restrictions. The mask is applied for any key the user presses.

By EditMask you can set permitted or restricted characters, persistent (read-only) characters, different sections and many more.

For example EditMask=^Src:.*\r?\nw\:\d{0,3},h\:\d{0,3};\sx\:\d{0,4},y\:\d{0,4}$

displays (in textarea, always on two rows):

Src:[text]

w:[int],h:[int]; x:[int],y:[int]

where [...] are the only editable sections, [text] can contain any characters, [int] can contain only digits, max 3 or 4.

string MaskColor [red] The edit field blinks by this color, when user tried to write character conflicting with EditMask.

string ResultMask [] Mask applied after finish editing. Syntax is same as in EditMask.

When value collides with ResultMask, the ResultText message is displayed and editing continues.

string ResultText [] Message displayed when value collides with ResultMask

Enumeration type

string [!] Enum [] List of values for Enum type. This is array in string. The first character is the separator and this separator is used to separate items of array.

The item cannot contain the separator. For example ,one, two,three or |1,1|2,3.

string [!] EditEnum [] List of values for Enum type when editing. It cannot contain HTML code. If is missing it is used Enum array instead.

Useful when Enum array contains HTML code (when <Cfg NoFormatEscape=1/>)

string [!] EnumKeys [] List of keys for Enum type. Set this array to convert indexes to predefined strings. Must be set also <Cfg EnumKeys=1/>

Used only for downloading and uploading, in API are enums still handles as integers.

string IntFormat [] For Enum type. If set the cell shows integer numbers for indexes outside the Enum array and formats them using this format.

Can be used for read only cells. Example: Enum=|never|once|twice IntFormat=###0 times

string [] Related[] The comma separated list of column names. For enumeration types (Enum, Radio).

The enumeration list for the cell is selected according to value(s) in Related columns from EnumA_B_C... attributes,

where A,B,C are column values from cells in columns in Related list, in that order.

Use with Refresh attribute. When the Enum attribute for the values does not exist, the original Enum without prefix is used.

Example (B is related to A, C is related to B and also to A)

<C Name=A Type=Enum Refresh=B,C Enum=|One|Two/>

<C Name=B Type=Enum Related=A Refresh=C Enum0=|a|b|c Enum1=|1|2/>

<C Name=C Type=Enum Related=A,B Enum0_0=... Enum0_1=... Enum0_2=... Enum1_0=... Enum1_1=.../>

string [] Refresh [] What cells to refresh after value of the cell changes. Used also with Related attribute.

The comma separated list of column names. The cells in the same row and in these columns will be refreshed.

There can be use some special names: *Row whole row, *Parent whole parent, *Grid whole grid

Column capabilities

int CanEdit [1] Column values can be edited, can be set to 2 to enter edit mode as readonly for Type=Lines shows scrollbars.

bool CanFocus [1] Column cells can be focused

bool CanResize [1] Column can be resized

int CanMove [1] How column can be moved. 0 no, 1 inside section, 2 also between sections user can freeze variable columns and vice versa.

For spanned columns see also Group attribute

int Group [0] If set to >0 the group the column belongs to. Set it for spanned cells. The group must be continuous.

The columns can be moved only inside its group and any other column cannot be moved inside the section.

The first (left) column in the group cannot be moved within group and also must stay the first

The whole group can be moved by dragging the first left column to another location.

Set to all columns that are spanned to the same value to ensure that user does not break the column order.

This attribute has no relation with grouping rows.

bool CanHide [1] If column is displayed in columns menu and can be hidden or displayed by user.

Setting to 0, the column can be shown or hidden by API only.

You can also use CanHide=0 and Visible=0 to define always hidden column to store any custom data

or to predefine sorting behavior see <Cfg> SortCols

int CanFilter [1] Rows can be filtered by this column. If set to 2, it is also tested cells CanFilter attribute.

bool CanSort [1] Rows can be sorted by this column

int CanGroup [1] Rows can be grouped by this column, its caption can be dragged to drop area for custom sorting in group row.

0 cannot be grouped, 1 can be grouped, 2 can be grouped, but column is not hidden when grouping.

bool CanCopy [1] Values can copied from this column to clipboard by Ctrl+C.

int SortType [0] The way of sorting strings, bit array: bit 1 reserved, bit 2 (&2) 1 = case insensitive localized sorting, see also CharCodes property.

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

string WhiteChars [ ] White chars to ignore when sorting with SortType = 8. Default is space only. Setting this attribute can slow down sorting.

int GroupType [0] Flags for grouping rows according to this column, it contains value for GroupTypes.

string GroupDef [] A name for default row for group row when grouping according to this column.

It is used instead of Group but not instead of GroupLast

bool ToolTip [0] Cell values are displayed as tool tip on mouse hover

int Rows [1] For backward compatibility only. Use Type=Lines instead.

Calculation

string Formula [] Formula for calculated column. If set, column is calculated. See document Cell Formulas.

Remember, set CalcOrder for every row if you use in some formula result of another formula on the same row.

Remember, all cell values you use in formula must be set in all rows. Value not set is not 0 but undefined and cannot be calculated.

Best way is to set all values from formula to 0 in some Def, usually in Def R.

Right button

string Button [] Type of button on the right in the cell. Used usually to show predefined or custom dialog for advanced editing.

None - no button, use it for Date types if you do not want to show button (for time values for example)

or if you want to override column or default settings in cell to hide button

Button - user <BUTTON>, set WidthPad to button width and ButtonText to text on button.

After user clicks button, there is called OnButtonClick event.

Img - user <IMG>, set WidthPad to button width and ButtonText to image src.

Date - date picker for date type, it is default for Date type.

Html - any HTML code displayed as is.

Defaults shows menu with predefined default values to select one like from combo.

set Defaults to array (separated by first character) of predefined values in list.

Default value is None for all types except Date for that is Date. See also WidthPad and ButtonText attributes.

int WidthPad [0] Width of button/img tag. If Button = Button or Img or Html, then is required value

string ButtonText [''] Button text or img src or HTML code for Button = Button or Img or Html.

type [!] Defaults [] Array of predefined values to list for Button of type Defaults. It contains only values of cell type.

It can contain special items starting with *:

*Date - after click on menu item it shows date picker to select date

*Button - after click on menu item it calls OnButtonClick user event for the cell

*Default item contains default value for the cell (value from Def row).

*FilterOff only for filter row, switches off the filter operator

*Rows... there will added items containing values from other rows in this column according other settings:

...Variable... from variable rows

...Fixed... from fixed rows

...All... from fixed and variable rows

...Sibling... only from all sibling rows

...Def... only from rows that have the same default (Def attribute) as the row

...Visible... only visible rows

...CanFilter... (for Filter row) only rows that can be filtered according to this column

...MaxN... maximally N most frequent values

For example: *RowsVariableDefMax20 returns maximally 20 variable rows with the same default row.

Context menu

string [!] Menu Context menu for all cells in the column. 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.

Extents and visibility

int Width [] Column width in pixels, if empty is computed before the grid is first displayed.

Saved to cookies - can be suppressed by WidthLap attribute.

int RelWidth [] Relative width in % of column. If set, the Width parameter is ignored. You can also set minimal width by MinWidth.

The width is % of the rest of MainTag width minus widths of all columns without the RelWidth attribute set.

Example: <C Width=100/> <C RelWidth=30/> <C RelWidth=70/><C Width=50/>, if the client width of MainTag is 300,

the second column will be (300-100-50)*0.3=45 pixels wide and the third column will be (300-100-50)*0.7=105 pixels wide.

int MinWidth [] Minimal width of relative width column.

int Size [] Max characters in tag input, not used for textarea.

bool Visible [1] Column is visible, see also CanHide. Saved to cookies - can be suppressed by VisibleLap attribute.

<Header> Top header with column captions. This tag can only be in <Grid>. In cell values are titles (captions) for individual columns

It contains also settings of root node.

Root node settings

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

bool CanSort [1] Root rows can be sorted

bool Visible [1] If the header is displayed

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

Header settings

bool NoEscape [0] If set to 1, the captions can contain HTML code and are not escaped

bool Wrap [0] Let wrap caption text to more lines if needed

Multi line header settings

int Rows [1] Count of rows in header, 1 is minimum, use for multi-caption headers

If there are more rows than 1, one row is main row with column captions and functions for sorting, resizing and moving columns

and other rows are section rows with no user input, but can be spanned to more columns and also can contain html code.

If you set Rows>1 you must set all appropriate LeftXX, MidXX and RightXX attributes too!

If you set Rows>1 you usually need to disable column moving ability <Cfg ColMoving=0>.

int Main [0] Index of main row with column captions and response to user activity, if Rows are greater then 1.

string LeftRC [] Cell value for other rows then Main if Rows is greater then 1 for left columns section.

RC are wild-cards, attribute name is for example Left00 or Left312 (R is always one digit, C can be larger).

R is row index, cannot be the same as Main. You have to use all row indexes from 0 to Rows-1 except Main.

C is cell index from 0. No one index can be skipped, independently on span value.

Value can be a HTML code.

int LeftRCSpan [1] How many columns this cell spans. You have to span all columns in section. This is for left columns section.

Sum of ...Span must be the same as count of all columns in section (+ row panel in left section).

string RightRC [] Cell value for right columns section, see LeftRC.

int RightRCSpan [1] Span for right columns section, see LeftRCSpan.

string MidRC [] Cell value for variable columns section, see LeftRC.

int MidRCSpan [1] Span for variable columns section, see LeftRCSpan.

<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 [] Unique ID of the page. By this ID is page identified when downloading data for this page. Used only if Rows are not set.

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, identifies page, 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 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 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 [] Unique ID of the row. 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 Rows identification tutorial.

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.

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).

string Kind [Data] A kind of the row. This can be:

Data Standard data row with cell values. Can be fixed or variable. Can be source for calculations. Can be sorted, filtered, ...

Filter Row with filter settings for filtering data rows. It can be fixed row only.

See specific cells attributes for filter row.

User User row without columns. Cannot be edited by standard grid functions. Can contain any html code. It can be fixed row only.

Row is divided to sections. For every section displays HTML code from attribute LeftVal, MidVal or RightVal.

See specific rows attributes for user row.

Group Special grouping row. It can be only one and must be fixed row. It is not divided to column cells and even sections.

In JavaScript API is not in fixed rows, but it is accessible by XGroup property.

Note: when grouping, created grouping rows have always default row Group.

See specific rows attributes for grouping row.

Space User row without columns and sections. It can be fixed row only.

In JavaScript API is not in fixed rows, but it is accessible by XS array property.

It can be placed to head or foot rows, but its position is Space attribute.

This row is not divided to any section, has still visible all its content and can contain any HTML code.

See specific rows attributes for space row.

Pager Special vertical pager. It can be only one and must be fixed row. It is not divided to column cells and even sections.

In JavaScript API is not in fixed rows, but it is accessible by XPager property.

If used, shows simple pager with links to all pages in horizontal row. Still can be displayed also standard vertical pager.

See specific rows attributes for pager row.

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

string Class [] Name of CSS style class to use for whole row, useful especially for User and Space rows.

string Color [] Predefined default background color for row, used instead of Default color.

Row capabilites

int CanEdit [1] Row values can be edited, can be set to 2 to enter edit mode as readonly for Type=Lines shows scrollbars.

bool CanFocus [1] Row can be focused

bool CanDelete [1] Row can be deleted

bool CanSelect [1] Row can be selected

bool CanDrag [1] Row can be moved by mouse dragging. To where can be row moved is specified by drop targets CDef attribute.

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] Row shows icon to expand / collapse

bool CanSort [1] Rows immediate children can be sorted (to suppress sorting for root rows, you can set this parameter in <Header>)

bool CanCopy [1] Row can be copied by copy by panel copy button

bool CanGroup [1] Row can 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.

Row state, usually set in uploaded data only

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 rows cell value has been changed. Which cell is specified by the cells 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.

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 columns cell, you have to specify rows CalcOrder attribute.

string [] CalcOrder [] If row is calculated, there is comma separated list of column names. In this order are rows 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 rows children.

Or you can use asterisk with number (*1,*2,...) to calculate rows 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 cells Recalc parameters to ensure appropriate recalculations.

User row (attributes of rows with Kind=User)

string LeftVal [] Left section value for User row

string MidVal [] Variable section value for User row

string RightVal [] Right section value for User row

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

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

Grouping row (attributes of row with Kind=Group)

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.

In the group row is the default list displayed in special column named _List (starts with underscore),

therefore other cell settings for List cell you can set to this column name (for example _ListHtmlPrefix=xxx).

int ListWidth [100] Width in pixels of the cell with predefined default groupings.

string ListCustom [] Value displayed in List cell for custom grouping not in Cols. 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.

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] The same as in Space row.

bool Panel [1] If the row displays (disabled) panel, just for the same look as other rows.

Space row (attributes of row with Kind=Space)

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

If more 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 Html [] Html code displayed in the row

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

bool Panel [0] If the row displays (disabled) panel, just for the same look as other rows.

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.

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

Pager row (attributes of row with Kind=Pager)

int Space [4] The same as in Space row.

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.

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 rows children.

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

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 grids 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.

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 panels 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. Dont confuse selected and focused row. The focused row is the only row with cursor.

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 MaxHeight [0] Maximal height of row in pixels if used Type=Lines, Html, and editing for Img, Link and for User rows. Value 0 is without limit.

int MinHeight [0] Minimal height of row in pixels if used Type=Lines, Html, and editing for Img, Link and for User rows. 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 columns 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 Header to 2, every new row will be added to the end of table, to the root.

int MaxChildren [300] Maximal count of rows 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.

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

Cells Cell value and settings can be set by two ways according to format used.

Cells can be in tags <I>, <D>, <Header>

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()).

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

string SortValue Cell value used for sorting, 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, useful for special non editable cells like Html, Img, List, ..., see also OnGetFilterValue event

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.

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.

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

bool CanSort [1] Rows 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.

Overridden columns attributes

string Type Overridden columns type

string Format [] Overridden columns format string

string EditFormat [] Overridden columns format string for editing

string ExportFormat [] Overridden columns format string for export to Excel

string EditMask [] Overridden columns mask string for editing

string MaskColor [] Overridden columns MaskColor

string ResultMask [] Overridden columns ResultMask

string ResultText [] Overridden columns ResultText

string [!] Enum [] Overridden columns list of values for enum type. Due performance needs, this can be used only in <D> and fixed <I> only !

string [!] EditEnum [] Overridden columns EditEnum

string [!] EnumKeys [] Overridden columns EnumKeys

string IntFormat [] Overridden columns InttFormat.

string [] Related[] Overridden columns list of column names for related enumerations

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

string Button [] Overridden columns Button.

int WidthPad [0] Overridden columns WidthPad.

string ButtonText [''] Overridden columns ButtonText.

type [!] Defaults [] Overridden columns Defaults.

string [!] Menu Overridden columns Menu

string [!] MenuIcons Overridden columns MenuIcons

string MenuCaption Overridden columns MenuCaption

Styles 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 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.

bool Visible [1] If set to 0, the cell content is not displayed (the button if any is still visible)

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.

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.

Filters (attributes of rows with Kind=Filter)

string Filter [0] Selected filter, only for filter rows (Kind=Filter). This value is overridden by settings from cookies.

Now can be only predefined filters: 0 Off, 1 Equal, 2 - Not equal,

3 - Less then, 4 - Less then or equal, 5 = "Greater then, 6 - Greater then or equal,

7 Begins with, 8 - Not begin with, 9 - Ends width, 10 - Not end with, 11 Contains, 12 - Not contain

int FilterType [0] The way of filtering strings, only for filter rows (Kind=Filter), the same as columns 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, 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.

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.

Calculations

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

Due performance needs, this can be used only in <D> and fixed <I> only !

int Recalc [] What to recalculate, if value changed. Binary mask. Overrides rows 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.

Other attributes

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

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.

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

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.

<Pager> Settings of pager

bool Visible If pager is visible. Pager can be visible only if Cfg.Paging > 0. Pager visibility user can select from configuration menu and is saved to cookies.

string Caption Pager caption

int Width Starting width of pager in pixels.

bool CanResize If pager can be resized by user

<Toolbar> Settings of bottom toolbar

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

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

bool Save, Reload, Repaint, Print, Add, AddChild, Sort, Calc, ExpandAll, CollapseAll, Columns, Cfg, Help [1] If this button is visible.

int ExpandAllType [1] Which rows expand all expands, bit array. Bit 1 (&1) if set, expands only already loaded rows (for server child paging).

int AddChildType [0] Where to add, move or copy row(s) to children, bit array. Bit 1 (&1) = 0 to beginning of children, 1 to end of children.

string Formula [] Standard formula thats 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.

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

<MenuCfg> Settings of configuration dialog

bool ShowDeleted, AutoSort, AutoUpdate, CheckUpdates, Separator1, MouseHover, ShowDrag, ShowPanel, ShowIcons, ShowPager, ShowAllPages [1]

If this option is visible. Default is 1 for all.

<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 rows attribute names. Attribute names always use Internal format !

Updates

3.2

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

3.3

Added <Img> description

Deleted <Cfg> attributes CacheImages and ImgPath

Added <Cfg> attributes DebugCalc, DateStrings

3.3.3

Updated <Header> section, multi rows header support

3.4

Added <IO Session> attribute

3.5

Added <Col> attributes SortType and WhiteChars, CanHide, Visible

Added <Cfg> attribute NoFormatEscape

Added Cell attribute WidthPad

Added <B> attribute NameXY

3.6

Excluded from file TreeGridDataFormats.htm

Added <Cfg> attributes AcceptEnters and VarHeight

3.7

Added <Cfg> attribute Focused, FocusedPos and FocusedCol

3.8

Added <Cfg> attributes PageLengthDiv, FastPages, RootCount, NoPager, PageTime

Added <Cfg> attributes NoScroll, NoHScroll, NoVScroll

Added <Cfg> attribute Copying. Added <I> attribute Copy

Updated <B> attribute Count

Added cell attribute ToolTip

4.0

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

Updated attribute CanEdit and <Cfg> attribute Editing

Added <Cfg> attribute RowHeight.

Cell and <C> attribute Rows is now obsolete.

Added new cell Types Link and Img

Added cell and <C> attributes EditMask, MaskColor

Added <Cfg> attribute Silent

Added <I> attribute Spanned

Added cell attributes Span, Merge, MergeStart, MergeEdit

Added <I> attribute CanExpand

Added <Cfg> attribute HideRootTree

Added <Header> attribute Visible

Added <Img> attribute Style

Added <Header> attribute NoEscape

Added <Cfg> attribute FilterEmpty and updated <I> attribute CanFilter

Added <Cfg> attributes MaxHeight and MaxWidth

Added <C> attribute RelWidth

Added <I> attributes RelHeight

Added <Cfg> attributes NoTreeLines, SaveExpanded, SaveSelected, SaveValues, NoScrollAfterExpand

Added new cell Type List

Added <C> attribute Group

4.0.3

Added <C> and cell attributes ResultMask and ResultText

Added <Cfg> attribute BaseUrl

Added <I> and <Cfg> attribute SortSpan

4.1

Added new cell Type Radio

4.2

Added <Cfg> AlertWidth attribute

Added <I> and <Header> AddParent attribute

Updated attribute MaxWidth

Added <Cfg> attribute ResizingMain

Added <Cfg> attribute ReversedSortIcons

Added <Cfg> attribute MaxSortColumns

Added <I> attribute FilterType

Added <C> and cell attributes Related and Refresh

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

Added <Cfg> attributes PrintPrefix and PrintPostfix

Added <C> and cell attribute IntFormat

Added <Cfg> attributes IdNames, FullId and NumberId

Added cell attribute Visible

Updated <I> Class attribute

Added <C> attribute MinWidth

Added <IO> Reload attribute

Updated <Cfg> attribute DateStrings

Added cell attributes SortValue, SortDescValue, FilterValue and CopyValue

Added <C> attribute CanCopy

4.3

Added <Panel> attribute Copy

Added new section <Colors>

Added <I> and cell attribute Color

Updated <Cfg> attribute Selecting

Added <I> CanCopy attribute

Added cell and <C> attribute Defaults and updated <C> attribute Button

Added <Cfg> attribute InEditMode

Added cell and <C> attribute ExportFormat

Added cell CanFilter attribute and updated <C> CanFilter attribute

Updated <I> attribute CanFilter

4.4

Added cell and <C> attribute EditEnum

Updated Radio cell type

Updated <C> CanMove and Group attributes

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

Added <Header> attribute Wrap

Added <Cfg> CalcOrder and updated <I> CalcOrder attributes

Added <Cfg> Detail, DetailOn, DetailExpand attributes and <I> Detail attribute

Added cell CopyTo attribute

Updated <C> SortType localized sorting

Added <Cfg> SaveSession attribute and updates <IO> Session attribute.

Added <IO> ReloadMessage and UpdateMessage attributes

Added cell MergeType attribute

Added <I> attribute Prev

4.5

Added <Cfg> attributes GroupCols, GroupTypes, GroupMain

Added <Cfg> attribute MaxGroupLength

Added <C> attributes GroupType and CanGroup

Added <I> attribute CanGroup

Updated <I> Kind attribute, added value Group

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

Added <Cfg> attributes ReCalc and ReSort

Updated <C> attribute Defaults, added value FilterOff

Added cell attributes DefaultFilter and ShowMenu

Added <Cfg> attribute EmptyChildPages

Added <I> attribute MaxChildren and MaxChildrenDiff

Updated ResizingMain

Added <Toolbar> attributes Formula, FormulaCol

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

Added <Cfg> attribute ExportType

Added <Cfg> attribute PrintCSS

Added <Cfg> attribute PersistentCfg

Updated <I> Kind attribute, added value Pager

Added <I> attributes HtmlPrefix, HtmlPostfix

Added cell attribute ExportValue

4.5.2

Added <Toolbar> AddChildType

4.5.4

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

Added <Cfg> attribute OnePage

4.5.9

Added <Cfg> attributes EmptyNumber, EmptyDate

Added <Cfg> attribute Keys

4.5.11

Added <Cfg> attribute ColsPosLap

4.6

Updated <Cfg> MaxHeight attribute

Added <Cfg>, <C> and cell attribute EnumKeys

Added <Cfg> attribute StaticCursor

Added <C> GroupDef attribute

Updated <D> attribute name, new value added GroupLast

Added <Colors> attributes Detail and DetailSelected