News in version
TreeGrid Gantt chart SpreadSheet Examples Documentation Download Development Licensing Prices References Contacts Buy Try it free
Documentation
Search in documentation
TreeGrid versions compatibility

Changes log (txt file) Using custom CSS from 13.3 to 14.0 Upgrading from 9.3 to 10.0 Upgrading from 5.9 to 6.0

Using in JavaScript frameworks

Angular Ember Express React Svelte Vue Other frameworks NodeJS server SalesForce LWC

Creating grid

Simple examples Basic information Creating grid Deleting grid Reloading grid Rendering grid Accessing grid by API

Data & communication
Data communication with server

Communication types AJAX communication AJAX SOAP envelope Submit communication Directly included data Data from JavaScript Cross domain / local load by JSONP Sessions (AJAX) Server response (AJAX) Synchronous communication (AJAX) Caching (AJAX) API (AJAX)

Download data

Settings for data download Layout XML structure Data XML structure

Upload data

Settings for data upload API for upload XML structure sent to server

Changing data from server

XML structure of download changes XML structure of request for a cell Synchronizing data with server

Input / output data formats

Complete list of tags Internal XML format Short XML format Extra short XML format DTD XML format JSON format

Cells
Cell basics

Cell type Cell format Dynamic format Dynamic type Cell value Reading / writing attributes by API Cell HTML Cell default Range or more values in one cell Cell with link URL Cell hint Cell tooltip / title Cell popup menu

Cell editing and changing values

Cell editability Dynamic editing Locking Defaults list Suggest list (auto complete) Tags input Changing cell value Mass cell change Clearing cells Editing cells Controlling <input> tag by JavaScript Input validation and restrictions Side checkbox Cell selecting

Calculations - cell formulas

Basics Formulas Mathematical functions Aggregate functions Special functions for actions Custom functions

Calculations - editable cell formulas

Basics Suggest list (auto complete) Defined names Actions for choosing cells Conditional functions Lookup functions Cell reference functions Logical functions Informational functions Mathematical functions Trigonometry functions Rounding numbers Number conversions String functions Date functions Summary functions Custom functions

Cell side buttons

Introduction Right side Button Left side Icon

Cell spanning

Column span Row span Dynamic spanning

Cell style and color

Basic grid style Sizing and scaling - responsive design Dynamic cell style attributes Cell CSS class Cell background color Dynamic cell border Cell HTML style Row color alteration Cell mouse cursor

Editable cell images

Insert image Edit image

Cell types
Automatic type - Auto String - Text, Lines & Pass
Number - Int & Float

Format Localization

Date and time - Date

Format Calendar component Dates dialog Localization

List & combo - Enum & Radio

Introduction Definition Related lists Enum specific Radio specific

Checkbox - Bool
Action button - Button

Introduction Basic clickable button Switch button Radio / tab button Menu button Combo switch button Combo radio / tab button Special Space rows with buttons

Panel with more buttons - Panel

Definition Standard fast panel Custom panel

HTML and special types

Html type EHtml type (editable) Icon type Abs type List type Editable Link type Editable Img type DropCols type Upload File type

Columns

Column basics Column index Column visibility Column visibility menu Column selecting Column tree Auto column tree Column position and moving Column adding and copying Column deleting Column width Column API

Rows
Row basics

Rows by functionality Rows by position Row name Row id Row index

Default rows

Description Example of default rows Example of changing default row Attributes

Row tree

Tree attributes Actions & API for expand / collapse

Row identification

Setting row id attribute Row id attribute in tree Row id created from cell values API for row ids

Row visibility
Row adding and copying

Five ways of adding rows to grid Adding and copying restrictions Adding new empty rows Copying existing rows

Row deleting Row moving and dragging Row selecting Row height Row API Space rows
Features
Sorting rows

Sort settings Controlling sort position Comparing strings Sorting actions Sorting API

Grouping rows to tree

Group settings Creating groups Comparing strings Created group rows <D Group='1'/> User interface to choose grouping Grouping actions and API

Filtering rows

Filter settings Comparing strings User interface to choose filter Filter actions and API

Searching in rows and cells

Search settings User interface for search Search actions and API

Printing grid

Print settings Choosing items to print Page size Print API

Print / export to PDF

Introduction Client side settings Printing options Client side API Server side API Data sent from client to server

Export to Excel or CSV

Introduction and export types Basic settings Styling export XLSX export Gantt export CSV export Old XLS / XHTML export Export API Communication with server Client export Server export

Import from Excel

Basic settings Sheets manipulation

Copy & paste rows via clipboard

Copy & paste permissions Copying to clipboard Pasting from clipboard

Master - detail grids

Introduction External master - detail grids Nested master - detail grids Synchronizing grids Other attributes for master - detail

Pivot tables

Pivot attributes & API Pivot formulas

External objects (custom JavaScript objects) Undo & Redo
Gantt and bar chart
Gantt objects

Gantt objects list Display settings Edit settings

Main bar

Definition of main bar and plans Main bar as Task Edit settings Main bar content and side html Tip on mouse hover Vertical position and height Style specific attributes API to manipulate Main bars Actions Side text (deprecated) Real Flow (deprecated)

Run bar

GanttRun Definition Extended definition Run bar as Task Edit settings Save format Selecting Run boxes Run box content and side html Tip on mouse hover Box identification Vertical position and height Style specific attributes Overlaid (Error) boxes Containers for more boxes Dragging - moving and resizing API to manipulate Run boxes Actions Run special formulas

Summary task

Main for Main Main for Run Editable Main Editable Run

Gantt icons - Flag & Point

Flag - icon with text Point - math points

Gantt display objects

Header - column captions Cell and column Background Vertical movable Line Mark & Progress line

Gantt zoom

Zoom options Chart size limits Zoom selection Paging in Gantt chart

Dependency, constraints & schedule

Introduction Data units Defining dependencies Dependency colors and shapes Changing dependencies Correcting dependencies Scheduling algorithm Project date constraints Task date constraints Critical path - Slack (Float)

Gantt calendars

Global base calendar Local calendar Calendar list Calendars dialog Other settings

Gantt resources

Resources list Resources assign Resources filter Resources calculations Availability chart Resource usage chart Generated resource usage chart

Gantt popup menu Gantt API
Line and XY points charts

Charts in grid cells Chart JSON definition Base chart settings Basic attributes Size Axis and caption Individual chart lines Data sources Visual settings API for standalone usage

Paging in large grids
Paging root rows

Paging types and attributes Auto adding root pages API for paging

Pager components

Side pager Side pager type Pages Side pager type Gantt Side pager type Custom Pager with navigation buttons & edit Pager as list of page indexes

Paging in tree

ChildPaging - load / render on expand MaxChildren - limit children count ChildParts - load / render on scroll

Paging columns

Paging types and attributes Auto adding column pages API for column paging

Server paging

Server paging for root rows Server communication in root paging Root paging in very large tables Server paging in tree Server communication in tree paging XML Request for Data in root paging XML Download Data in root paging XML Request for root Page / children XML Download root Page / children API for server paging

TreeGrid DLL/SO for server paging

Introduction Compatibility with TreeGrid control Using TreeGrid server DLL/SO ASP.NET C# ASP.NET VB PHP JSP Java TreeGrid server concepts Function reference Calculations

JSON menus and dialogs
JSON menu description JSON menu definition example
Menu settings

Base attributes Visual settings Key navigation Behavior Size and scroll

Menu item settings

Base attributes Clickable item Inactive caption Collapsible sub level Popup sub menu Columns Bool item Enum item Edit item

Custom menu in JavaScript

Show custom menu Custom menu position Custom menu advanced settings Custom menu JavaScript events Custom menu JavaScript methods

Calendar dialog Custom calendar & JavaScript events Custom dialog in JavaScript
Global grid settings
Grid size and scroll

Default behavior Maximize grid height and width Update size according to the content Let a user to control the grid size Widths of individual sections Other scrolling attributes and API

Media rules - responsive design
Languages

Language & regional setup (Text.xml) Translate texts dynamically Change language

Grid cursor - Focus & hover

Focused cell and row Focused cell range Move and copy focused cells Filling cell values by dragging Tabulator navigation Key navigation Cursor look - focus & hover

Selecting rows, cells and columns

Selecting base Selecting rows Selecting cells Selecting columns

Global settings

Status messages Configuration menus Configuration menu - options Configuration menu - columns Configuration menu - print / PDF Configuration menu - export Default toolbar Useful API function Help file

Animations

Animations base Row animations Column animations Cell animations Animations for undo / redo Animations for server side changes Dialog animations

Grid configuration in cookies
Mouse & key events & actions

List of event handler types TreeGrid mouse events Mouse event names Key and mouse button prefixes Touch event names Event targets Assigning event actions / callbacks Event action parameters Action name suffix Calling actions from JavaScript Creating custom actions Focused vs. Actual cell TreeGrid key events JavaScript API events

Mouse API event TreeGrid files
Debugging and testing

Debug window Automated testing

Date and time - Date

TreeGrid documentation

Date type shows date and / or time in selected format.
It supports direct editing or selecting the date(s) from popup calendar.

Format

<C> <cell> string

Type

["Text"] Type = "Date"
To define Date type, set column or cell attribute Type to "Date"
<cell> type

value

The date values in input XML can be set as string in these formats,
date: yyyy-M-d, M-d, M/d/yyyy, M/d, dd.MM.yyyy, dd.MM
time: HH:mm, HH:mm:ss, hh.mm, hh.mm.ss, including am/pm, AM/PM, a.m./p.m., A.M./P.M.
If set only time, it cannot be separated by dot.
The date values in input XML can be also set as number of milliseconds from 1/1/1970 00:00:00
The date values uploaded to server are by default in format "M/d/yyyy HH:mm:ss", if some part of date is 0, it is omitted.
If some date in input XML is set as number of milliseconds, all uploaded dates are also in number of milliseconds. See <Cfg DateStrings/> attribute.
The date values in API are always integers as number of milliseconds from 1/1/1970 00:00:00
new 6.0 <C> <cell> bool

CanEmpty

[1]
If the cell date value differ between 1/1/1970 00:00:00 and "".
It has sense especially for time only values.
If set to 0, the empty input value is always converted to 1/1/1970 00:00:00, internally to 0. So the cell never contains (empty) string value.
new 6.0 <C> <cell> string

EmptyValue

[""]
The string displayed when the date value is entered as empty string.
The cell can contain empty value only if CanEmpty is 1.
It is shown only for display, not for edit.
It is not escaped, it can contain HTML code.
new 6.3 upd 6.7 <Cfg><C><cell> string

DefaultDate

Default date (and time) shown in calendar for empty dates.
(new 6.7) Used also when editing date / time in cell, the missing in the input are got from the DefaultDate.
For example input: "12/12" and DefaultDate: "1/1/2000 21:30" will return "12/12/2000 21:30"
upd 15.0 <C> <I> <cell> string

Format

Specifies date and / or time string format - how the date and / or time will be displayed.
This format string uses almost the same formatting as Microsoft .NET System.DateTime.ToString (string format) function.
Empty format
If the Format is not set or is empty (default), the default US English format is used "M/d/yyyy HH:mm:ss".
If some part of the date is 0, it is omitted, some examples: "5/9/2000 12:43:56", "12:00", "6/5/2000".
If set BaseSeparators, it uses the localized date and time separators.
Standard format (two letters)
(New 14.0.10) Localized in all languages. Separated date and time, to use date with time use Assembled format like "sd*tm".
This format loads user format from file Text.xml or localized TextXX.xml, tag <Format>.

sdShort partial dateUS:"M/d", GB: "d/M", DE:"d.M"
syShort full dateUS:"M/d/yyyy", GB:"d/M/yyyy", DE:"d.M.yyyy"
swShort full date with week dayUS:"ddd M/d/yyyy", GB:"ddd d/M/yyyy", DE:"ddd d.M.yyyy"
smShort month and yearUS:"M/yyyy", GB:"M/yyyy", DE:"M/yyyy"
snShort week numberUS:"\wddddddd", GB:"\wddddddd", DE:"\Wddddddd"
ldLong partial dateUS:"MMMM d", GB:"dddddd MMMM", DE:"dddddd MMMM"
lyLong full dateUS:"MMMM d, yyyy", GB:"dddddd MMMM yyyy", DE:"dddddd MMMM yyyy"
lwLong full date with week dayUS:"dddd, MMMM d, yyyy", GB:"dddd, dddddd MMMM yyyy", DE:"dddd dddddd MMMM yyyy"
lwaLong full date with abbreviated week dayUS:"ddd, MMMM d, yyyy", GB:"ddd, dddddd MMMM yyyy", DE:"ddd dddddd MMMM yyyy"
lmLong month and yearUS:"MMMMMMM yyyy", GB:"MMMMMMM yyyy", DE:"MMMMMMM yyyy"
lnLong week numberUS:"'week' ddddddd", GB:"'week' ddddddd", DE:"'Woche' ddddddd"
adAbbreviated partial dateUS:"MMM d", GB:"dddddd MMM", DE:"dddddd MMM"
ayAbbreviated full dateUS:"MMM d, yyyy", GB:"dddddd MMM yyyy", DE:"dddddd MMM yyyy"
awAbbreviated full date with week dayUS:"ddd, MMM d, yyyy", GB:"ddd, dddddd MMM yyyy", DE:"ddd dddddd MMM yyyy"
awlAbbreviated full date with long week dayUS:"dddd, MMM d, yyyy", GB:"dddd, dddddd MMM yyyy", DE:"dddd dddddd MMM yyyy"
amAbbreviated month and yearUS:"MMMMMMM yyyy", GB:"MMMMMMM yyyy", DE:"MMMMMMM yyyy"
anAbbreviated week numberUS:"'week' ddddddd", GB:"'week' ddddddd", DE:"'Woche' ddddddd"
thStandalone time, hours onlyUS:"h tt", GB:"HH", DE:"HH"
tmStandalone time, hours and minutesUS:"h:mm tt", GB:"HH:mm", DE:"HH:mm"
tsStandalone time, hours, minutes and secondsUS:"h:mm:ss tt", GB:"HH:mm:ss", DE:"HH:mm:ss"
tfStandalone time, hours, minutes, seconds and msUS:"HH:mm:ss.fff", GB:"HH:mm:ss.fff", DE:"HH:mm:ss.fff"
sthTime for short date, hours onlyUS:" h tt", GB:" HH", DE:" HH"
stmTime for short date, hours and minutesUS:" h:mm tt", GB:" HH:mm", DE:" HH:mm"
stsTime for short date, hours, minutes and secondsUS:" h:mm:ss tt", GB:" HH:mm:ss", DE:" HH:mm:ss"
stfTime for short date, hours, minutes, seconds and msUS:" HH:mm:ss.fff", GB:" HH:mm:ss.fff", DE:" HH:mm:ss.fff"
lthTime for long date, hours onlyUS:", h tt", GB:", HH", DE:", HH"
ltmTime for long date, hours and minutesUS:", h:mm tt", GB:", HH:mm", DE:", HH:mm"
ltsTime for long date, hours, minutes and secondsUS:", h:mm:ss tt", GB:", HH:mm:ss", DE:", HH:mm:ss"
ltfTime for long date, hours, minutes, seconds and msUS:", HH:mm:ss.fff", GB:", HH:mm:ss.fff", DE:", HH:mm:ss.fff"
yqYear and quarterUS:"MMMMM yyyy", GB:"MMMMM yyyy", DE:"MMMMM yyyy"
yqYear and halfUS:"MMMMMM yyyy", GB:"MMMMMM yyyy", DE:"MMMMMM yyyy"
Auto format (one letter)
Auto format is one letter format. This format loads user format from file Text.xml or localized TextXX.xml, tag <Format>.
It is automatically chosen for Auto type according to the content.

dShort date("M/d/yyyy")
hShort date + short time("M/d/yyyy H:mm") renamed 13.0, from "g"
HShort date + long time("M/d/yyyy H:mm:ss") renamed 13.0, from "G"
jShort date + short time with am/pm("M/d/yyyy h:mm tt") new 13.0
JShort date + long time with am/pm("M/d/yyyy h:mm:ss tt") new 13.0
mDay and short month("M/d") changed 13.0
yShort month and year("M/yyyy") changed 13.0
tShort time("H:mm")
TLong time("H:mm:ss")
iShort time with am/pm("h:mm tt") new 13.0
ILong time with am/pm("h:mm:ss tt") new 13.0
DLong date("d. MMMM yyyy")
lLong date + short time("d. MMMM yyyy H:mm") renamed 13.0, from "f"
LLong date + long time("d. MMMM yyyy H:mm:ss") renamed 13.0, from "F"
kLong date + short time with am/pm("d. MMMM yyyy h:mm tt") new 13.0
KLong date + long time with am/pm("d. MMMM yyyy h:mm:ss tt") new 13.0
MDay and long month("d. MMMM")
YLong month and year("MMMMMMM yyyy"). For month name uses the attribute LongMonthNames2 (from file Text.xml, tag <Format>). LongMonthNames2 could contain noun's first case if the language supports it.
Special format (one letter)
Special format is used for display only. It is one letter format. This format loads user format from file Text.xml or localized TextXX.xml, tag <Format>.
gShort date + short time("M/d/yyyy H:mm") Deprecated 13.0, collides with number format
GShort date + long time("M/d/yyyy H:mm:ss") Deprecated 13.0, collides with number format
fLong date + short time("d. MMMM yyyy H:mm") Deprecated 13.0, collides with number format
FLong date + long time("d. MMMM yyyy H:mm:ss") Deprecated 13.0, collides with number format
sSortable date time("yyyy-MM-ddTHH:mm:ss")
uUniversal sortable date time("yyyy-MM-dd HH:mm:ssZ")
UUniversal date timefor example: 13. January 2004 17:12:34. This date time is converted to GMT !
r, RRFC1123("ddd MMM d HH:mm:ss UTCzzzzz yyyy"), for example: Tue, 13 Jan 2004 18:12:34 GMT Deprecated 13.0, collides with number format
aLong date with week("dddd, dddddd MMMM yyyy")
Assembled format
Since 14.0 if the format string contains asterisk (*), it loads the user defined formats from <Lang><Format ... /></Lang> tag.
For example: <Lang><Format d1='d/M/yy' d2='d/M' d3='yyyy' t1=' HH:mm'/><Lang>, Format="*d1" is converted to "d.M.yy", Format="d1*t1" is converted to "d.M.yy HH:mm", Format="d2*/*d3*+++*t1" is converted to "d/M/yyyy+++ HH:mm".
The assembled format can refer any predefined formats (Standard, Auto, Special) and any predefined custom format.
The assembled format can refer another assembled format, these references should contain asterisk on both sides.
User format
User format can contain any characters but only few have special meaning and other are written into output without any change.
:Place for time separator, defined in file Text.xml, tag <Format>, attribute TimeSeparator. (colon by default).
/Place for time separator, defined in file Text.xml, tag <Format>, attribute DateSeparator. (slash by default).
dMonth days 1 - 31
ddMonth days 01 - 31
dddWeekdays Sun - Sat
ddddWeekdays Sunday - Saturday
dddddWeekdays S - S
ddddddMonth days 1st - 31st
dddddddYear weeks 1 - 52
ddddddddYear weeks 01 - 52 (new 9.0)
Dnot used
DDThe rest of days in week, in count of weeks from 1/1/1970 (it is not weekday!) (new 6.1)
DDDYear day 0 - 365 (new 6.1)
DDDDCount of days from 1/1/1970, for duration in days (new 6.1). Since 13.0 accepted also as [d]
DDDDDCount of weeks from 1/1/1970, for duration in weeks, see DD (new 6.1)
DDDDDDTenths of month days: empty,1,2,3 (new 6.3)
DDDDDDDMonth days: 1-9,0-9,0-9,0-1 (new 6.3)
MMonth 1 - 12
MMMonth 01 - 12
MMMMonth Jan - Dec
MMMMJanuary - December
MMMMMYear quarters, I, II, III, IV
MMMMMMYear halves, I, II
MMMMMMMJanuary - December, used LongMonthNames2 for languages with inflection
yYear 0 - 99
yyYear 00 - 99
yyyCount of years from 1/1/1970, for duration in years (new 6.1). Since 13.0 accepted also as [y]
yyyyYear 0000 - 9999
yyyyyYear of week 0000 - 9999, use with week numbers (ddddddd). It differs from yyyy only in few last days in December. (new 15.0)
hHours 1 - 12
hhHours 01 - 12
hhhCount of hours from 1/1/1970 00:00:00, for duration in hours (new 6.1). Since 13.0 accepted also as [h]
hhhhTenths of hours empty or 1 (new 6.3)
hhhhhHours 1-9, 0-2 (new 6.3)
HHours 0 - 23
HHHours 00 - 23
HHHnot used
HHHHTenths of hours empty or 1 (new 6.3)
HHHHHHours 0-9, 0-9, 0-3 (new 6.3)
mMinutes 0 - 59
mmMinutes 00 - 59
mmmCount of minutes from 1/1/1970 00:00:00, for duration in minutes (new 6.1). Since 13.0 accepted also as [m]
mmmmTenths of minutes 0 - 5 (new 6.3)
mmmmmMinutes 0 - 9 (new 6.3)
sSeconds 0 - 59
ssSeconds 00 - 59
sssCount of seconds from 1/1/1970 00:00:00, for duration in seconds (new 6.1). Since 13.0 accepted also as [s]
ssssTenths of seconds 0 - 5 (new 6.3)
sssssSeconds 0 - 9 (new 6.3)
fHundreds of milliseconds, 0 - 9 (new 6.3)
ffTenths of milliseconds 00 - 99 (new 6.3)
fffMilliseconds - 000 - 999 (new 6.3)
ffffTenths of milliseconds 0 - 9 (new 6.3)
fffffMilliseconds - 0 - 9 (new 6.3)
tFirst letter of AM/PM designator, by default A or P as the first character of AMDesignator / PMDesignator. Since 13.0 it can be set also by "a/p" or "A/P".
ttAM/PM designator, by default AM or PM. Since 13.0 it can be set also by "am/pm" or "AM/PM".
The designator is defined in file Text.xml, tag <Format>, attributes AMDesignator and PMDesignator.
zTimezone hours -12, +0, +13
zzTimezone hours -12, +00, +13
zzzTimezone hours and minutes, -12:00, +0:00, +13:00
\Escape character, the next character is placed to output without any changes. Use to place format characters as d,M,y,... It needs to be doubled '\\'
'xxx' or "xxx"Characters in quotes or double quotes are placed to output without any changes. Use to place format characters as d,M,y,...
%Place before format when use one character user format like 'd' (=> '%d') to not be taken as standard format.
;(new 13.0) Separates the format for text as prefix@suffix where @ displays the text or if @ is missing, it displays only the text after the ";".
Since 13.3 it separates the formats with conditions.
[color](new 13.0) Colors the whole text in given CSS color.
[condition] (new 13.3) Uses given part (parts are separated by semicolon) only if the value fulfills the condition.
Condition can be simple as: [=date], [<>date], [<date], [<=date], [>date], [>=date].
Or the condition can be complex JavaScript formula. The formula can use predefined variables d (day), M (month), y (year), w (week day, 0 = Sunday), h (hours), m (minutes), s (seconds), t (milliseconds). yh (hijri year), Mh (hijri month), dh (hijri day). For compatibility it can use also "=" and "<>" for comparing.
For example: Format="[y>2010&&y<2015][blue]d.M.yyyy;[y=2018][red]d.M;d.M.yyyy"

For example: Format='dddd, MMMM yyyy hh:mm:ss tt' => "Sunday, February 2004 13:24:00"
Format='"date:" MM/dd/yyyy", time:" HH:mm" => "date: 10/03/2001, time: 12:34"

If you want add HTML tags before and after value, use rather cell attributes HtmlPrefix and HtmlPostfix instead of Format.
If you really need to place HTML tags into output (for example to use HTML tags for one part of date only), set <Cfg NoFormatEscape='1'>. The HTML tags can be set in Format only, not in EditFormat.
Since 15.0 it is read also from row.
chg 13.3 upd 15.0 <C> <I> <cell> string

EditFormat

Format string for editing the date and / or time.
In this format is displayed the Date cell when edited.
It is also used for parsing entered date string if it is ambiguous, e.g. "18/04" can be "dd/MM", "MM/dd" or even "yy/MM".
Empty format
Since 13.3 if it is not set, it uses Format value.
If it is empty, it accepts all formats like input XML:
date: yyyy-M-d, M-d, M/d/yyyy, M/d, dd.MM.yyyy, dd.MM
time: HH:mm, HH:mm:ss, hh.mm, hh.mm.ss, including am/pm, AM/PM, a.m./p.m., A.M./P.M.
If set only time, it cannot be separated by dot.
Standard or user format
Its structure is the same as Format, but not all formats are possible for input, only number inputs are supported.
Since 13.3 if set StrictDates 3. bit (&4) (default setting), months can be entered also by their name or shortcut. In this case the separators are not required. The month names can be localized in InputMonthNames.
The format should contains only these parts of custom format: d, dd, DDDD, M, MM, MMM, MMMM, y, yy, yyyy, h, hh, hhh, H, HH, m, mm, mmm, s, ss, sss, t, tt.
Since 13.0 all the other unsupported parts of the custom format are removed or converted to supported parts.
Since 13.3 the unsupported standard formats can be converted to supported formats according to EditFormats.
The user can use more separators set by InputDateSeparators, InputTimeSeparators and InputDateTimeSeparators.
The am / pm can be localized in InputAMPMDesignators.
If set StrictDates 4. bit (&8) (default setting) the user can also enter the date / time without separators, only as number, in formats like HHmm, HHmmss, MMddyy, MMddyyyy, in the order set in the EditFormat.
Since 15.0 it is read also from row.
new 16.2 <Cfg> string

EditDateTimeFormat

Specifies format for editing for all cells without EditFormat of "Date" or "Auto" type containing date with time.
new 16.2 <Cfg> string

EditDateFormat

Specifies format for editing for all cells without EditFormat of "Date" or "Auto" type containing date without time.
new 16.2 <Cfg> string

EditTimeFormat

Specifies format for editing for all cells without EditFormat of "Date" or "Auto" type containing only time.
Usual settings in spreadsheet are EditDateTimeFormat="H" EditDateFormat="d" EditTimeFormat="T".
chg 15.0 <C> <I> <cell> string

ExportFormat

TreeGrid date time format to be used instead of the cell Format for export to Excel.
Its format is the same as Format, it is converted to Excel number format.
From 12.1 to 14.1 it was not used for old xls export except for ExportType="Dates", it used XlsFormat instead.
Since 15.0 it is used for all exports, including xls and it is also read from row.
new 12.1 chg 15.0 <C> <I> <cell> string

XlsFormat

Excel date time format to be used instead of the cell Format and ExportFormat for export to Excel.
It is exact MS Excel format string passed directly to xlsx format or to xls CSS attribute mso-number-format.
Since 15.0 it is used also for xlsx and it is also read from row.
It is not used to export to csv.
chg 6.0 <Cfg> bool

NoFormatEscape

[1]
If set to "", it means 0 for text and 1 for number and date.
If set to 0, the Format is escaped, so the characters & and < are displayed as they are.
If set to 1, you can use HTML tags in columns Format string, in prefix and postfix for text and anywhere for numbers.
new 13.0 <Cfg> bool

ExcelDates

[0]
0 - all dates in grid are integer numbers as count of milliseconds since 1/1/1970.
1 - all dates in grid are floating numbers as count of days since 1/1/1900. Cannot be used with Gantt chart
It affects everything, input data and output data if dates are numbers and all dates for API.
Setting to 1 sets also all dates to GMT by <Format GMT='1'/>.
Due internal implementation the setting is shared among all grids on page!
chg 6.0 <Cfg> type

DateStrings

[0/1]
If set to 0, Date values are uploaded as numbers (milliseconds from 1/1/1970), see also GMT attribute.
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).
If set to string, it specifies the full date format for upload.
By default it is set to 0, if some date in input XML is set as number of milliseconds, otherwise is set to 1.
chg 6.0 <Format> bool

GMT

[1]
If set to 1, all number dates are in GMT / UTC and are not affected by a user time zone, all users will see the same times.
If set to 0, all number dates are in the local time of user time zone, so they are shown different for different time zones.
The number dates are the input / output dates set as count of milliseconds from 1/1/1970 00:00:00.
The dates are internally stored always as the numbers, so if you access the cell values directly, you get / set always the count of milliseconds.
This setting is global for all grids on page!
Setting GMT to 0 is not recommended in Gantt chart, because of shifts due summer / winter time.
new 6.2 <C> <cell> bool

GMT

Cell GMT modification for display and edit.
If this attribute has different value than <Format GMT> value, it shows the cell date in local or GMT timezone.
It affect only display and editing date string, not the value itself, so for upload, API, calculations, sort, filter, search and Gantt are still used the original values.
<Format> int

Hirji

[0] RTL
Because of backward compatibility the attribute name is Hirji instead of Hijri
If grid uses and shows Persian Hijri / Jalali dates and calendar instead of standard Gregorian dates, bit array.
1. bit (&1) - 1 - All dates are displayed and entered in Hijri.
2. bit (&2) - 2 - All dates in XML are in Hijri.
new 13.0 chg 13.3 <Format> int

StrictDates

[15]
If and how restricts entering incorrect dates, bit array.
1. bit (&1) - If set, restricts entering incorrect dates. If not set, accepts also dates like 14/30/2000 and converts it to 2/30/2001.
2. bit (&2) - new 13.3 If set, the entered string must contain only date, not any prefix or suffix string.
3. bit (&4) - new 13.3 If set, permits entering month by its name or shortcut.
4. bit (&8) - new 13.3 If set, permits entering date or time as a number without separators (e.g. "020718" as 2/7/2018).
5. bit (&16 - new 13.3 If set, permits entering elapsed time (hours>23 or minutes/seconds > 59), but the time cannot be set without separators.
It affects only cells without EditFormat. With EditFormat the incorrect dates are always restricted and depend on the edit format.
Since 13.3 default value changed from 1 to 7.
new 13.0 <Format> int

DateFormatLowercase

[1]
If set, the months can be set also by 'm' and 24hour hours also by 'h' in the Format string.
The 'm' as month is identified if the format contains d or D or y and does not contain h or H or M.
The 'h' as 24hour hour is identified if the format does not contain t or tt.
If set to 2, it also converts the whole Format to lower case before used.
global func. string

DateToString

(Date date, string format)
Converts date to string according to format string like in function ToString() in C#.NET.
date can be string or number, will be converted to date by standard Date(string).
If format is missing, uses English format "mm/dd/yyyy hh:mm:ss", for today uses "hh:mm:ss", for 00:00:00 uses "mm/dd/yyyy", seconds are omitted if are 0.
global func. Date

StringToDate

(string str, string format)
Converts string to date according to format string as in function ToString() in C#.NET.
If format is missing, converts str as in standard format for date "d.m.y", "d.m", "m/d/y", "m/d", "y-m-d","m-d" and time "hh:mm:ss", "hh:mm" and for date and time combines these formats separated by any other character.

Calendar component

<C> <cell> string

Button

["Date"]
For editable Date type is the button set to "Date" by default, except is set <Cfg AutoCalendar='1'/>.
It shows right side button to display popup Calendar dialog on click to choose the date from.
To hide the calendar button set Button="", it is useful especially for time only values.
<Cfg> bool

AutoCalendar

If set to 1, Calendar dialog for Date cells is displayed automatically when user starts editing. In this case the calendar reflects changes in the input and vice versa.
If set to 1, the Button type Date is not displayed for Date type by default. To display it, there must be explicitly set by Button='Date'.
new 6.0 <C> <cell> bool

AutoCalendar

If set to 1, Calendar dialog for Date cells is displayed automatically when user starts editing. In this case the calendar reflects changes in the input and vice versa.
If set to 1, the Button type Date is still displayed for Date type by default. To hide it, there must be explicitly set by Button=''.
The difference to <Cfg AutoCalendar/> is only in the default visibility of the Date button.
chg 6.0 upd 6.7 <C> <cell> int

CalendarButtons

[0/7]
Which calendar buttons will be visible. By default for empty value are all buttons displayed for Range and no button for standard date cells. Bit array.
1. bit (&1) - Today button, 2. bit (&2) - Clear button, 3. bit (&4) - OK button. = 0 no button visible, = 7 all buttons visible.
Since 6.7 there can be 4.bit (&8) for Yesterday button.
new 6.2 <C> <cell> string

Calendar

Full settings of the calendar in JSON format. See the documentation.
new 9.0 <C> <cell> string

ActualDate

Actual date highlighted in calendar. If not used, used today according to the client time.
<Actions>

ShowCalendar ...FAO

Attached to events OnClickSideDate, OnEnter, OnCtrlDown
Displays the Calendar dialog for selecting date for the actual or focused cell.
API event bool

OnCanEditDate

(TGrid grid, TRow row, string col, Date date)
Called when displaying Calendar dialog for every date in the calendar to permit only some dates to be selected by user.
new 10.0 API event string

OnGetCalendarDate

(TGrid grid, TRow row, string col, Date date, string text, string[ ] classes, bool range)
Called when displaying Calendar dialog for every date in the calendar to let modify the displayed date text and / or class.
date is the Date object for given day. text is the text that will be displayed for the day.
classes is an array of four CSS classes that will be used for the day: [normal, hover, selected, selected+hover]. The event handler can modify theses four strings to use different CSS classes.
range is true if the calendar will permit selecting more dates or date ranges. If it is false, the classes use only first two strings.
Return the text of date or text.
new 11.0 API method TCalendar

ShowCalendar

(TRow row, string col, TCalendar Calendar, TPosition Pos = null, function Func = null, object Date = null, bool always = false)
Shows custom calendar for given cell.
Closes any actually shown dialog in grid. If there is already dialog shown for this cell and not set always, it closes the dialog and returns null.
Calendar contains special settings for the calendar.
Func is function (TMenuItem I) called after click to the menu. The I has at least I.Name as the item name. It replaces menu.OnSave.
Date is initial date to show in calendar.
For more information about the parameters see global function ShowCalendar.
To manually close the calendar you can call API method CloseDialog or calendar.Close().
new 6.2 global func. TCalendar

ShowCalendar

(TCalendar Calendar, TPosition Pos, function Func, type Date)
Shows custom calendar on given position. For more information see the ShowCalendar.

Dates dialog for date ranges and repeating

new 7.0 <C> <cell> string

Button

["Dates"]
It shows right side button to display popup Dates dialog on click to choose the date ranges.
This dialog is used for Text type in special format "Repeat1#Date1a~Date1b#Value1;Repeat2#Date2a~Date2b#Value2;..."
This format is used for GanttExclude, GanttBackground and Gantt resource Availability. And can be used also for any custom reason.
The default meaning of the format is repeat date range set by DateXa~DateXb every RepeatX time unit and optionally assign given ValueX to these ranges.
It is possible to set only Value as for all dates. It is also possible to omit Value to not use it. And it is possible to omit Repeat to not repeat the date range.
The Dates dialog shows new popup grid with columns defined by next attributes.
The popup grid has set its id to DatesDialog, you can control it in API events as usual, e.g. Grids.OnLoaded = function(G){ if(G.id=='DatesDialog') { ... } }
The grid internal column names are Repeat, Start, StartTime, End, EndTime, Value.
Due internal implementation the Dates dialog is available only in Extended API!
new 7.0 <C> <cell> type

DatesRepeatXXX

Sets attribute XXX of column Repeat in the Dates grid.
Attribute Type of the Repeat column is Text by default.
For example set: DatesRepeatType="Enum" DatesRepeatEnum="||Weekly|Daily" DatesRepeatEnumKeys="||w|d"
To hide the column set DatesRepeatVisible='0'
new 7.0 <C> <cell> type

DatesStartXXX

Sets attribute XXX of column Start in the Dates grid.
Attribute Type of the Start column is Date by default.
For example set: DatesStartFormat="dddd, dddddd MMMM" DatesStartEditFormat="M/d/yyyy"
new 7.0 <C> <cell> type

DatesStartTimeXXX

Sets attribute XXX of column StartTime in the Dates grid.
Attribute Type of the StartTime column is Date by default.
This column is automatically hidden, if Start column is not of Type Date.
new 7.0 <C> <cell> type

DatesEndXXX

Sets attribute XXX of column End in the Dates grid.
Attribute Type of the End column is Date by default.
For example set: DatesEndFormat="dddd, dddddd MMMM" DatesEndEditFormat="M/d/yyyy"
new 7.0 <C> <cell> type

DatesEndTimeXXX

Sets attribute XXX of column EndTime in the Dates grid.
Attribute Type of the EndTime column is Date by default.
This column is automatically hidden, if End column is not of Type Date.
new 7.0 <C> <cell> type

DatesValueXXX

Sets attribute XXX of column Value in the Dates grid.
Attribute Type of the Value column is Float by default.
For example set DatesValueType="Enum" DatesValueEnum="|-5|-4|-3|-2|-1|0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15"
To hide the column set DatesValueVisible='0'
new 7.0 <C> <cell> string

DatesXXXCaption

Caption for the XXX column, where XXX can be Repeat, Start, End or Value.
new 7.0 <C> <cell> bool

DatesEndLast

[1]
If set to 1 and end date has not set time, it is shown as day before.
For example 1/1/2000 is shown as 12/31/1999, but 1/1/2000 1:00 is shown as 1/1/2000 1:00.
new 8.0 <C> <cell> int

DatesHeight

[ ]
Maximal height of the dialog in pixels. Default setting is grid main tag height.
For higher grids the popup grid shows vertical scrollbar.
new 11.0 <C> <cell> bool

DatesEmptyDate

[0]
0 - The start date and end date must be set both or both empty.
1 - The start date and end can be independently set or empty.
new 10.0 API event void

OnDatesClose

(TGrid grid, TGrid dates, bool saved)
Called when the Dates dialog is closed.
grid is the source grid that opened the Dates dialog.
dates is the grid showing dates dialog.
saved is false if no changes were saved (clicked to cancel or clicked to ok without any change in the dialog), true is when something changed by the dialog.
new 7.0 <Actions>

ShowDates ...FAO

Attached to event OnClickSideDates
Displays the Dates dialog for selecting date ranges for the actual or focused cell.

Localization

The default date format and setting are specified in Text.xml, in <Lang><Format /></Lang> tag.
The default settings is for English language, changing the Format tag attributes you can easily localize it to another language.
new 12.0 <Format> bool

BaseSeparators

[0]
Controls Int, Float and Date types conversions to string without explicit format string set.
If set to 1, it always uses standard U.S. English decimal, date and time separators and also date order M/d/yyyy.
If set to 0, it uses actual DecimalSeparator, DateSeparator and TimeSeparator and date format is chosed according to the date separator as "M/d/yyyy" or "d.M.yyyy" or "yyyy-M-d".
Prior to 12.0 the default value and behavior was 1, since 12.0 was changed to 0!
<Format> string[ ]

ShortDayNames

The week day short names, starting Sunday, used for the format "ddd"
Default is "Sun,Mon,Tue,Wed,Thu,Fri,Sat"
<Format> string[ ]

LongDayNames

The week day full names, starting Sunday, used for the format "dddd"
Default is "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday"
<Format> string[ ]

Day1CharNames

The week day one character names, starting Sunday, used for the format "ddddd"
Default is "S,M,T,W,T,F,S"
<Format> string[ ]

Day2CharNames

The week day calendar names, starting Sunday, used in calendar.
Default is "Su,Mo,Tu,We,Th,Fr,Sa"
<Format> string[ ]

DayNumbers

The month day numbers 1 - 31, used for the format "dddddd"
Default is "1st,2nd,3rd,4th,5th,6th,7th,8th,9th,10th,11th,12th,13th,14th,15th,16th,17th,18th,19th,20th,21st,22nd,23rd,24th,25th,26th,27th,28th,29th,30th,31st"
<Format> string[ ]

ShortMonthNames

The month short names, starting January, used for the format "MMM"
Default is "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec"
<Format> string[ ]

LongMonthNames

The month full names, starting January, used for the format "MMMM" and also in calendar
These names are expected for month name with day, like 20th January 2000.
Default is "January,February,March,April,May,June,July,August,September,October,November,December"
<Format> string[ ]

LongMonthNames2

The month full names, starting January, used for the format "MMMMMMM"
These names are expected for month name without day, like January 2000.
Default is "January,February,March,April,May,June,July,August,September,October,November,December"
new 13.3 <Format> string[ ]

InputMonthNames

[...]
The month names or shortcuts used for entering the month name, starting January, used for StrictDates &4. Case insensitive.
It can contain 12, 24, 36, 48, etc. month names, defined in 12 item sets like "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec,Ja,Fe,Ma,Ap,Ma,Jn,Jl,Au,Se,Oc,No,De".
Default is empty to use ShortMonthNames, LongMonthNames and LongMonthNames2 for entering month names.
<Format> string[ ]

Quarters

The year quarter names or numbers, used for the format "MMMMM"
Default is "I,II,III,IV"
<Format> string[ ]

Halves

The year half names or numbers, used for the format "MMMMMM"
Default is "I,II"
new 14.0 <Format> string

CalendarMonth

["MMMMMMM yyyy"]
Format to display month and year in calendar header.
<Format> string

DateSeparator

[/]
The string displayed in place of '/' in the format string. It is intended to separate date parts.
new 6.0 <Format> char[ ]

InputDateSeparators

[/.-]
The characters accepted as date separator while editing
<Format> string

TimeSeparator

[:]
The string displayed in place of ':'' in the format string. It is intended to separate time parts.
new 6.0 <Format> char[ ]

InputTimeSeparators

[:]
The characters accepted as time separator while editing
new 13.3 <Format> char[ ]

InputDateTimeSeparators

[...]
The characters accepted as separator between date and time while editing. Case insensitive.
Default is any character except digits and InputTimeSeparators and InputDateSeparators, but nothing added to accepted characters for editing Date.
<Format> string

AMDesignator

[AM]
The string displayed for dates before noon. It is used only for display.
<Format> string

PMDesignator

[PM]
The string displayed for dates after noon. It is used only for display.
new 13.3 <Format> string[]

InputAMPMDesignators

[...]
AM and PM designator names used accepted for editing. Case insensitive.
It can contain more names defined like "am,pm,a,p,a.m,p.m".
Default is AMDesignator,PMDesignator and also their first character.
<Format> int

FirstWeekDay

[0]
The starting day of the week, the 0 is Sunday, 1 Monday, ....
It is used by Calendar dialog.
new 7.0 chg 11.0 <Format> int

FirstWeekYearDay

[0]
The first day in week (always from Sunday) to be the week marked as the first week in year.
Set it to 0 for U.S. week numbering and to 3 for ISO/European week numbering.
Set FirstWeekDay accordingly, for standard behavior you should use FirstWeekDay=0 for U.S. numbering and 1 for ISO numbering.
Since 11.0 the default value has been changed to 0 for U.S. week numbering to be synchronized with FirstWeekDay.
<Format> string

NaD

[NaN]
String displayed for incorrect date - Not a Date.
new 13.3 <Format> string[]

EditFormats

[""]
Conversion for standard one letter date formats for editing.
It converts the first item to the second item, third item to the fourth item and so on.
Default value in versions 13.0 - 13.2 was "M,m,D,d,l,h,L,H,f,h,F,H,Y,y,U,H,r,H,R,H,a,d,k,j,K,J" to convert "M" => "m", "D" => "d", "f" => "h", "F" => "H", "Y" => "y", "U" => "H", "r" => "H", "R" => "H", "a" => "d"
Since 13.3 the default value is empty to not convert any format, but rather automatically remove the unsupported parts for editing.
new 7.1 <Format> int

HirjiYear

[0] RTL
Because of backward compatibility the attribute name is HirjiYear instead of HijriYear
Used when converting input hijri dates with year less than 100.
By default it is added 1300 to the year.
If defined HirjiYear, the years less or equal to this number are increased by 1400 instead of 1300.
new 12.0 <Format> int

Digits

[]
First character separated array of 10 digits strings to replace the standard digits 0 - 10.
Useful to display Arabic digits instead of standard digits by such definition:
<Lang><Format Digits="|&#x660;|&#x661;|&#x662;|&#x663;|&#x664;|&#x665;|&#x666;|&#x667;|&#x668;|&#x669;"/></Lang>
It replaces all digits in all cells, regardless of the cell type!
new 12.0 <C> <cell> int

Digits

[]
Digits to replace for this cell or column. Used only if some <Format Digits> are defined.
Set it to empty string to not use the <Format Digits>
new 13.3 API method void

UpdateLangFormat

( )
Updates internal language settings. Call it after a change of the Lang.Format attributes.