TreeGrid XML data format reference

TreeGrid v4.3

 

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 !). Array is list of comma separated values.

In [ ] is default value from file Defaults.xml.

Floating point numbers use ‘.’ as decimal separator and no thousands separator. Don’t 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’.

 

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’

 

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

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

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

2Auto (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.

3Load (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.

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

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

                                                                2Auto (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.

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

 

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

                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

                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]             Row’s 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 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 MaxHeight [0]            If set to 1, updates height of main tag to fill the whole window, the page must have floating (not absolute) layout.

                By resizing main tag must be resized 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.

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 – both)

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

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

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 don’t 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 row’s 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.

 

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 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 row’s 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 NoScroll [0]                If set to 1, does not use TreeGrid’s 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 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 NoTreeLines [0]        If set to 1, does show connecting lines in tree, just expand / collapse buttons

                bool NoScrollAfterExpand [0]         If set to 1, does not scroll into view the row’s 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

                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.

 

<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 row’s 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.

                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>         Row’s 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.

                                                               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 don’t 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 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.

                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 cell’s CanFilter attribute.

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

                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.

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

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

 

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 Row’s 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 is usually fixed row.

                                               “User” – User row without columns. Cannot be edited by standard grid functions. Can contain any html code. It is usually fixed row.

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

                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 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 target’s 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]                 Row’s 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

 

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

                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.

                string [] CalcOrder []        If row is calculated, there 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.

 

User row

                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

 

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.

See <Cfg> attributes Detail to control when will be displayed the row’s 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 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.

 

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.

                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 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 Header to 2, every new row will be added to the end of table, to the root.

 

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

 

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

 

Overridden column’s attributes

                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. Due performance needs, this can be used only in <D> and fixed <I> only !

                string [] EditEnum []           Overridden column’s EditEnum

                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.

 

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

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

               

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.

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

 

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

 

<MenuCfg>              Settings of configuration dialog

                bool ShowDeleted, AutoSort, AutoUpdate, 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 row’s 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