TreeGrid XML
Columns
TreeGrid v5.9
TreeGrid column is defined by tag <C>.
The column specifies position, size, visibility of the grid column. And also specifies type, formatting and other setting for all cells in the column. The type, formatting and other settings can be overridden for every particular cell by its attributes.
Column caption can be set in <Header> tag and not in <C> tag.
TreeGrid column can be fixed (frozen) or variable (scrollable).
Fixed (frozen) column can be positioned on the left or on the right grid side. The fixed column cannot be scrolled outside view. TreeGrid does need to contain any fixed column.
To set fixed column, place the <C> tag to <LeftCols> or <RightCols> section.
If all fixed columns together are too wide, wider then main tag width, TreeGrid can neither scroll them nor display them, so it cannot display its content and displays only message “Too small extents”.
Variable (scrollable) column is positioned between left and right fixed section.
To set variable column, place the <C> tag to <Cols> sesction.
If all variable columns are wider then the variable section, they are horizontally scrolled.
To predefine some attribute for all columns, set it to <D Name=’C’> tag. This is tag is placed to <Def> section. In particular column you can redefine the default attribute value set by <D> tag. For example if you define <Def><D Name=’C’ Type=’Int’/></Def> all columns will have Type Int.
There is one special column, the row’s left panel with buttons for deleting and selecting row. It is positioned as the first left fixed column and can be visible or hidden. It can be set by <Panel> attribute placed in root <Grid> tag.
In tree there is one main column where is displayed tree with icons for expanding and collapsing. In grid there can be only one main column, its name is set by <Cfg MainCol> attribute.
Column caption and other header setting are set by <Header> tag placed in root <Grid> tag.
<D Name=’C’>
Default column. From this column are filled all attributes in all columns except panel that are not explicitly set. This tag can be placed only in <Def> tag.
It has the same attributes as <C> tag, except the Name is set to “C”.
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 <Panel 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. It affects only options in action CopyMenu.
You can use OnRowCopy event to control what values will be copied in which option
bool Move [0] If the button Move is visible. This button is hidden also if Cfg.Dragging attribute is 0.
bool CanHide [0] If panel is displayed in columns menu and can be hidden or displayed by user from this menu.
If set to 1, the panel can be also hidden automatically if there is no room for it, to preserve displaying “Too small extents” message.
This attribute does not affect displaying and hiding panel from configuration menu.
string ClassOuter [“GPanel”] Predefined class for the panel, here you can also set background color.
string ClassOuterHover [“GPanelHover”] Predefined class for the panel under mouse cursor
<C>
One column settings. Values of not set attributes are read from default <D Name=”C”>. This tag can be placed in tags <LeftCols>, <Cols>, <RightCols>.
Column position in grid is according to position of <C> 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>. Otherwise is as caption used column Name.
Columns are identified by attribute Name. Every column must have set this attribute.
The Name identifies column and row’s cells. Under this name are row’s cells in this column set and accessed.
All column names must be unique among all column names inside one grid.
Under this name grid saves column configuration to the cookies. If you change any column name, you should increment <Cfg> attribute Version to clear old configuration.
In JavaScript API, cell is accessed by column name.
Column names are used also in formulas.
! Attention !
Column names are case sensitive.
Column names can contain only letters (a-z, A-Z), underscore ‘_’ and digits (0-9), but cannot start with digit and should not start with underscore.
Column names must not interfere with row’s attribute names, like Def, Kind or Deleted !
The best way is to name columns as letter ‘A’, ‘B’ or ‘a’, ‘b’. There is no interference and data length is short.
For grids with many columns and saved configuration to cookies the column names should be less then 4 characters long, to shorten cookie length.
string Name [“”] Column name. Required. By this name are accessed cells in this column. Used also in formulas and in API functions. See Column names.
string Type [Text] Column type. The cells are calculated and formatted according to this type. The type can be also redefined in particular cell.
Bool Boolean value 1 and 0 – in HTML is displayed as checkbox.
When exporting can be used Format string “|false|true” to specify names for false and true
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.
To change permitted keys and number structure when editing, you can set EditMask and ResultMask attributes.
Float Floating point number, other is the 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> combo box with items from Enum array with this value as selected index.
It is integer type. To set and upload it as text see EnumKeys attribute. See also GetEnumIndex API method.
To show only subset of values according to value in another Enum cell see Related and Refresh attributes.
The enumeration can be also 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 or type Select instead of Enum type.
Select Cell with predefined values chosen from menu. It is shortcut for Button of type Defaults with non-editable Html cell.
The list of predefined values is in Defaults array. Cannot be used dynamically by API.
Radio Enumeration with radio buttons instead of combo box. 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 xml data can be set as number of milliseconds from 1.1.1970 or string in English format “mm/dd/yyyy hh:mm:ss”
It is integer type. Represents number of milliseconds from 1.1.1970.
By default are the integer values shown formatted according to local time, you can change it by <Lang><Format GMT=’1’/></Lang>.
It is uploaded as integer by default, you can change it by setting <Cfg DateString>
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”)
or is calendar is popped up automatically when set <Cfg AutoCalendar>
When editing, only valid keys are accepted, the other are ignored.
To change permitted keys and date structure when editing, you can set EditMask and ResultMask attributes.
Text One line string. It is displayed as text and when editing in <INPUT type=”text”>. This is default type. See also formatting text.
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 input xml data you need to use entities 
 and/or 
.
If you use AcceptEnters, use only LF (
)!
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.
Pass Password. It is displayed as “***”, when editing is displayed in <INPUT type=”password”>
For now passwords are sent not coded
Img Image. Cell value contains 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 contains 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 ‘<‘ in XML data and ‘&lt;‘ in HTML page.
Abs HTML elements absolutely positioned inside the cell in layers. It does not affect row height, it is always overflowed.
The value is first character separated array: |x|y|width|height|html|x|y|width|height|html|x|...
x,y is position relative to left top cell edge. width and height is size of the tag, html is any HTML code displayed
width and height can be void to not overflow the tag, but the tag is still overflowed by the cell size.
The count of displayed tags is unlimited. The tags are displayed in given order, the next tags overlays the previous.
Example: "|0|0|||<div style=’background:red;height:100px;’></div>|20|3|50|20|The text"
Gantt Displays Gantt chart. This type must be used for <C> tag. There are many specific attributes for Gantt type.
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.
Button Button, toolbar image button, custom image button, tabber page, menu item or any such button displayed in cell,
expected to be used mainly in Space rows. See Button type attributes.
DropCols Drop target to drag here column names. Only for cell in Space rows. The cell value contains comma separated column names
The cell of this type has special attribute Text – text displayed in the area, like “Drag columns’ captions here ...”
Pager Special simple pager cell, only for Space rows. Displays buttons GoFirst,GoPrevious,GoNext,GoLast and editable cell with page number and number of pages.
This cell is replaced by the mentioned buttons and the editable cell and no longer exist for API.
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”.
When set <Cfg> ExportType&64 to export dates as string, this format is used as standard TreeGrid format to format the date string.
string [] SearchNames [‘’] Used in SearchExpression to reference this column instead of its caption, one column can have more names to be reference by.
string MenuName [‘’] Html string displayed in columns menu for this column. If not set, the column caption is displayed.
Editing masks can be used for any column type.
For column types Int, Float and Date are predefined default editing masks. These masks can be also changed using following attributes.
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
These attributes are only for column with Type=’Enum’
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’/>)
For custom enum type (EnumType>=’1’) the EditEnum items can contain any HTML code and also:
Separator an be shown as item named ‘*-‘
Collapsible groups can be shown as item named ‘*+X’, where X is a number - shows the next item as parent with next X child items collapsed and displayed on click to the parent.
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. See also GetEnumIndex API method.
For example: <Cfg EnumKeys=’1’/> ... <C Name=’A’ Type=’Enum’ Enum=’|First|Second|Third’ EnumKeys=’|One|Two|Three/> ...
<I A=’Two’/> (displays ‘Second’), <I A=’One’/> (displays ‘First’)
Cannot be set in second and third level in Related enums.
For related enums you can <Cfg EnumKeys=’2’/> to upload text instead of index.
In input data the predefined value can be also set as text anyway.
int EnumType [0] Type of editing input. 0 – standard <SELECT> tag. 1 – Enum dialog with icon, 2 – Enum dialog without icon, 3 – Enum dialog with icon only when is 0.
string ClassEnum [‘’] CSS class prefix to use another set of “...Enum...” classes: GEnumCell, GEnum, GEnumItem, GEnumHover, GEnumIcon. Here is always added grid style prefix like “G” or “GM”.
Used only when EnumType > 0. When Enum is expanded, the ClassEdit is used too. But ClassInner is never used for the custom Enum type.
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
All these attributes are only for column with Type=’Gantt’.
Following attributes should be set only for whole Gantt column, not individual cells. And must set only by constant.
int GanttWidth [17] Width in pixels of one base unit set by GanttUnits.
string GanttUnits [‘d’] Base unit time, in these units is the Gantt chart shown, it can be:
‘m’ - minutes,’m5’ – 5 minutes, ’m10’ – 10 minutes, ’m15’ – quarters of hour, ’m30’ halves of hour,
’h’ - hours, ’h2’ – 2 hours, ’h3’ – 3 hours, ’h6’ – quarters of day, ’h8’ – thirds of day, ’h12’ - halves of day,
’d’ - days, ’w’ – weeks (starting by Sunday), ’w1’ – weeks (starting by Monday),
’M’ - months, ’M3’ – quarters of year, ’M6’ – halves of year, ’y’ – years
string GanttRound [‘m’] Base unit time rounding, to these units will be all dates rounded, possible values are the same as GanttUnits.
It can be set also to empty string to not to round. In this case the same start and due dates will produce no bar at all.
string GanttChartRound [] Gantt chart time rounding, to these units will be rounded the first and the last date for the whole chart, possible values are the same as GanttUnits.
string GanttFlowRound [] Flow rounding, to these units will be all dates in GanttFlow rounded, possible values are the same as GanttUnits.
string GanttMarkRound [‘m’] Mark rounding, to these units will be all dates in GanttMark rounded, possible values are the same as GanttUnits.
To display just thin vertical lines, set it to ‘m’, for thicker lines higher the value according to actual GanttUnits used.
string GanttBackground [] Date ranges displayed as background, useful for marking some period repeatedly.
For example: GanttBackground = ‘1/5/2008~1/6/2008;1/1/2008~1/1/2008 1:00’, GanttBackgroundRepeat = ‘d,M’ colors weekends and separates months by line
When GanttBackgroundRepeat is missing for given range, the range is the exact range to mark, nothing will be rounded or repeated
string GanttBackgroundRepeat [] GanttBackground will be repeated by these units, can be empty to not repeat. Possible values are the same as GanttUnits.
If GanttBackground contains more date ranges, it should contain more units (one per range), comma separated.
! Using too short interval and generating many backgrounds can remarkably slow down the Gant calculation!
int GanttMaxDependencies [100] Maximum of rendered crossing dependencies. When the maximum is reached, some crossing dependencies will be rendered partially.
For large tables and specific sorting or grouping there can be thousands of crossing dependencies and it can lock the grid because it will be too slow to render.
int GanttMin [] Minimal date displayed in the whole Gantt chart, can be null.
int GanttMax [] Maximal date displayed in the whole Gantt chart, can be null.
int GanttLeft [0] A count of empty base units that will be displayed before the whole Gantt chart
int GanttRight [0] A count of empty base units that will be displayed after the whole Gantt chart
string GanttHeader1 [] Header time in the first header line, possible values are the same as GanttUnits.
string GanttFormat1 [] Date / time format to format items in the first header line, the same as standard TreeGrid date / time format.
string GanttHeader2, GanttFormat2, ..., GanttHeader5, GanttFormat5 Next four possible headers and their formats
int GanttHeaderOptions [] Bit array of various Gantt header options
1.bit (&1) – 0 – The incomplete header items are shown, 1 – the incomplete header items are replaced by ‘...’
Following attributes can be set for whole Gantt column or for individual cells and can be set as column name or by constant
string GanttStart [] Start date, can be column name, date string (M/d/yyyy hh:mm:ss) or count of milliseconds
string GanttEnd [] Due date, can be column name, date string (M/d/yyyy hh:mm:ss) or count of milliseconds
When the GanttEnd date is empty (or the column value it points to), the milestone is displayed instead of main bar.
string GanttDuration [] Duration between start date and end date in GanttUnits. Should not be set with GanttEnd.
string GanttComplete [] % of completion (0 – 100) of the task, can be column name or integer
string GanttResources [] Text displayed next to main bar. It can be column name or a string
string GanttFlow [] Real flow times, can be column name or date range string “d1~d2;d3~d4;d5;...” (date string (M/d/yyyy hh:mm:ss) or count of milliseconds).
These dates extend the displayed date range in chart when needed
string GanttFlags [] A list of dates (separated by semicolon) where to display a flag with information specified by GanttFlagTexts.
It can be column name, a list of date string (M/d/yyyy hh:mm:ss) or a list of counts of milliseconds
string GanttFlagTexts [] A list of information for the individual flags. Separated by semicolon. This information is shown as hint (TITLE) for the flag.
It can be column name or a list of strings
string GanttMark [] Other times to mark in chart, useful for displaying actual date or vertically divide chart to bigger units or mark weekends and so on.
It can be column name or date range string “d1~d2;d3~d4;d5;...” (date string (M/d/yyyy hh:mm:ss) or count of milliseconds).
These dates do not extend the displayed date range in chart. When the date is outside the actual displayed range in chart, it is not shown.
string GanttDependencies [] A list of row ids of (next) dependent tasks, separated by semicolon. The dependencies are shown as arrows. Any task can be dependent on more others.
The arrows start from this task and points to the tasks specified by dependencies ids. See also GanttDependencyTypes.
string GanttDependencyTypes [‘fs’] A list of dependency types for individual GanttDependencies, separated by semicolon
Possible dependency types: SF (start->start), SF (start->end) FS (end->start, default), FF (end -> end)
Following attributes can be set for whole Gantt column or for individual cells and can be set only by constant
string GanttClass [“Gantt”] The prefix for all css classes used in the Gantt chart. Default is “Gantt”, the next predefined is “GanttG” for various purposes, e.g. grouped rows.
int GanttOptions [] Bit array of various Gantt options
1.bit (&1) – 1 – Hover the Gantt items, highlight them under mouse cursor
2.bit (&2) – 1 – On the ends of the task are displayed icons to highlight the start and end dates. Usually used for group tasks
3.bit (&4) reserved
4.bit (&8) – 1 – Resources can be assigned or entered directly in Gantt chart
5.bit (&16) – 1 – Main bars and milestones can be created, deleted and modified directly in Gantt chart
6.bit (&32) – 1 – Flow bars can be created, deleted and modified directly in Gantt chart
7.bit (&64) – 1 – Flags can be created, deleted, moved and modified directly in Gantt chart
8.bit (&128) – 1 – Dependency lines can be created and deleted directly in Gantt chart
9. bit (&256) – 1 – Automatically change startdate to the duedate of previous (by dependency) row
10. bit (&512) - 0 – Dependencies are set as ancestor tasks, 1 – dependencies are set as predecessor tasks
int CanEdit [1] If column values can be edited, can be set to 2 to enter edit mode as readonly – for Type=Lines shows scrollbars.
See also <Cfg Editing> attribute.
bool CanFocus [1] If column cells can be focused
bool CanResize [1] If column can be resized. If set to 1, column can also be resized automatically if there is no room for it, to preserve displaying “Too small extents” message.
int CanMove [1] How column can be moved, dragged by mouse.
0 – no, 1 – inside section, 2 – also between sections – user can freeze variable columns and vice versa.
For spanned columns see also Group attribute
bool CanDrag [1] If row can by caught by cell in this column for dragging. Set it to 0 to let a user to select text in cell instead of dragging.
bool NoFFDrag [0] Special attribute for Firefox and cells with external objects like SilverLight or Flash.
When set to 0, it permits mouse dragging actions by this cell, but after every click the object inside cell is refreshed and blinks.
When set to 1, all dragging actions for this cell are disabled, but after click the object is not refreshed and does not blink.
int Group [0] If set to >0, it is 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.
If set to 0, the column can be shown or hidden by API only.
If set to 1, the column can be also hidden automatically if there is no room for it, to preserve displaying “Too small extents” message.
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.
int CanSearch [1] Values are searched within this column
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 be copied from this column to clipboard by Ctrl+C.
bool CanExport [1] Values can be exported to Excel
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, filtering or grouping with SortType / GroupType / FilterType = 8. Default is space only. Setting this attribute can slow down the action.
string [!] CharCodes [“”] Changes characters in comparing strings for sorting, filtering and grouping.
It is first character separated array of pair of characters to replace the first character by the second when comparing strings.
For example “|y|i|Y|I|.|,” – replaces ‘y’ by ‘i’, ‘Y’ by ‘I’ and ‘.’ by ‘,’
– it means that when comparing strings does not differ between letter ‘y’ and ‘i’, both cases and also does not differ between comma and point.
The first character must be one letter, but the second in fact can be any letter or string or even empty string, like “|a|xxx|b||c|ff”
If you use TreeGrid server DLL/SO, there must be the second character one letter only too.
Defining this array can slow down sorting, grouping and filtering.
int GroupType [0] Flags for grouping rows according to this column, it contains value for GroupTypes. bit 1 reserved,
bit 2 (&2) - case insensitive localized comparing, see also CharCodes property, bit 3 (&4) – 1 = case insensitive comparing,
bit 4 (&8) – 1 = ignore white chars given by WhiteChars attribute,
bit 5 (&16) – do not create grouping row for empty values,
bit 6 (&32) – do not create single grouping row - when all rows have the same value in the column,
bit 7 (&64) – do not create grouping row for zero values
bit 8 (&128) – do not group deleted rows. Only when are shown (ShowDeleted=’1’), otherwise are not grouped anyway.
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” or the default that have set GroupCol.
int GroupWidth [] A width of column when it shows the tree with grouped rows.
bool ToolTip [0] Cell values are displayed as tool tip on mouse hover or cell ToolTip attribute is displayed. Here is used standard browser tooltip by HTML TITLE attribute.
Obsolete attribute - it is recommended to use ShowHint to show cell value or row Tip or cell Tip attribute to show text as tooltip.
bool ShowHint [1] Cell values that are not fully visible are displayed as hint while mouse is above the cell
int Rows [1] For backward compatibility only. Use Type=Lines instead.
bool Range [0] If the cell accepts a range or more values. Usable especially in filter cell. See cell Range attribute.
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 Name=“R”.
string Button [] Type of button on the right in the cell. Used usually to show predefined or custom dialog for advanced editing.
Or it is used to display menu with predefined default for the cell, Defaults type.
Default value is None for all types except Date, for that is Date. See also WidthPad and ButtonText attributes.
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, but only when is not set <Cfg AutoCalendar/>.
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.
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
*All – Chooses all items for range
*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
...ColX*... – values from another column, X is column name, from left must have prefix ‘Col’ and from right postfix ‘*’
For example: “*RowsVariableDefMax20” returns maximally 20 variable rows with the same default row.
Separator an be shown as item named ‘*-‘
Collapsible groups can be shown as item named ‘*+X’, where X is a number - shows the next item as parent with next X child items collapsed and displayed on click to the parent.
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.
Separator an be shown as item named ‘*-‘
Collapsible groups can be shown as item named ‘*+X’, where X is a number - shows the next item as parent with next X child items collapsed and displayed on click to the parent.
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.
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.
It is ignored when set NoHScroll=’1’.
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.
If there are many columns with RelWidth you should set <Cfg ShowVScrollbar=’1’/> to speed up the grid, especially in tree.
If any cell in this column contains right button, you have to specify column’s MinWidth to at least width of the button !
int MinWidth [] Minimal width of relative width, calculated width or resized width of column.
char AutoWidthChar [] Character used for automatic width calculation if the Width attribute is missing. Usually set to ‘m’ or ‘x’ character.
If empty, the longest string in column is used for calculation. If set, the string of the character long as the longest string in the column is used.
The automatic width calculation is done only for column types Bool, Int, Float, Enum, Text. And it is not done when server paging is used.
int AutoWidthPlus [0] Size added to calculated width (if the Width attribute is missing)
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.
bool OverflowEllipsis [0] When set to 1, shows “...” for all not fully visible cells. Works only in Internet Explorer. Does not work for main column and for header captions.
<Header>
Top header with column captions. This tag can only be in <Grid>.
In cell values are titles (captions) for individual columns.
To use tooltip or link in header cell, you can put any HTML code into header when you set NoEscape=’1’.
string cell [“”] Column caption, set by its name. The caption can contain HTML code only if is set NoEscape=’1’.
For example for <C Name=’Order’/> is caption set by <Header Order=’Main order’/>
string cellClassOuter [“GHeader”] Predefined class for the caption, here you can also set background color.
string cellClassOuterHover [“GHeaderHover”] Predefined class for the caption under mouse cursor
int cellAlign [0] Alignment of the whole caption (including sorting icons), 0 – left, 1 – center, 2 – right
string cellCopyValue [ ] Cell value used for copying to clipboard by Ctr+C
string cellExportValue [ ] Cell value used for export to Excel
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
bool Visible [1] If the header is displayed. ! Attention, if header is hidden, the table must contain at least one variable or fixed (= non space) visible row !
bool PanelVisible [1] If the left panel is displayed, to suppress its actions set also CanDelete=’0’ and CanSelect=’0’
bool CanExport [1] If header will be exported to Excel
bool CanDelete [1] If action delete selected rows is permitted
bool CanSelect [1] If action select all rows is permitted
bool CanCopy [1] If action copy selected rows is permitted
bool CanDrag [0] Now it is used only to show the Move icon on top panel.
By default every column has its one caption. In multi line header you can define another line(s) with captions spanned/grouped for more columns.
Be careful when is moving columns by user permitted, set appropriate Group attribute for spanned columns.
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.
Updates
Updated <Header> section, multi rows header support
Added <Col> attributes SortType and WhiteChars, CanHide, Visible
Excluded from file TreeGridDataFormats.htm to TreeGridDataFormatReference.htm
Added new cell Type “Lines”.
Updated <C> attribute CanEdit
<C> attribute Rows is now obsolete.
Added new cell Types “Link” and “Img”
Added <C> attributes EditMask, MaskColor
Added <Header> attribute Visible
Added <Header> attribute NoEscape
Added <C> attribute RelWidth
Added new cell Type “List”
Added <C> attribute Group
Added <C> and cell attributes ResultMask and ResultText
Added new cell Type “Radio”
Added <C> and cell attributes Related and Refresh
Added <C> and cell attribute IntFormat
Added <C> attribute MinWidth
Added <C> attribute CanCopy
Added <Panel> attribute Copy
Added <C> attribute Defaults and updated <C> attribute Button
Added <C> attribute ExportFormat
Updated <C> CanFilter attribute
Added <C> attribute EditEnum
Updated Radio cell type
Updated <C> CanMove and Group attributes
Added <Header> attribute Wrap
Updated <C> SortType localized sorting
Added <C> attributes GroupType and CanGroup
Updated <C> attribute Defaults, added value FilterOff
Added <C> attributes Menu, MenuIcons, MenuCaption
Added <C> attribute EnumKeys
Added <C> GroupDef attribute
Excluded from file TreeGridDataFormatReference.htm to TreeGridXmlCols.htm
Added <C> attribute CanSearch
Added <Header> attributes ClassOuter and ClassOuterHover
Added new type Select
Updated <C> Defaults, added ...ColX* ... value
Added <C> attribute SearchNames
Added types Button, DropCols and Pager
Added Panel ClassOuter and ClassOuterHover attributes
Added <Header> Align attribute
Added <C> attribute MenuName
Added <Panel> attribute CanHide
Added <C> attribute CanDrag
Added <C> attribute CharCodes
Added <C> and <Header> attributes CanExport
Added <C> attribute GroupWidth
Updated <C> attribute GroupType, bits 5 and 7
Added <Header> attributes CanDelete, CanSelect, CanCopy, CanDrag
Added <Header> cell attributes CopyValue, ExportValue
Added <Header> attribute PanelVisible
Added reference for Date type to GMT attribute
Updated <C> MinWidth attribute
Added <C> attribute ShowHint
<C> attribute ToolTip is marked as obsolete
Added information about <Cfg AutoCalendar>
Added Pager type
Added <C> attributes EnumType and ClassEnum
Updated Button type
Added <C> attribute OverflowEllipsis
Added <C> attribute NoFFDrag
Added Gantt type
Added <C> Gantt... attributes
Added Abs type
Added <C> attribute Range
Added Defaults item *All
Added Defaults, Menu and EditEnum items separator (‘*-‘) and group (*+X)
Updated <C> ExportFormat
Updated <C> attribute GroupType, added bit 8.