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
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 (like Adobe Flash)
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
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
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
TreeGrid documentation
TreeGrid supports copying cells, rows, columns and cell ranges into and from clipboard.
The data are in the same format as standard in spreadsheet programs like MS Excel, so it is possible to copy & paste cells between TreeGrid and MS Excel.
The format of copied & pasted data
Rows are separated by CRLF. Last row is
not
followed by CRLF. In pasting it accepts also single CR and LF as row separators.
Cells are separated by tabulator. Last cell is
not
followed by tabulator.
If cell value contains one of characters CR (\r), LF (\n) (
), tabulator (\t) (	) and double quote (") ("), it encloses the value into double quotes and doubles all double quotes inside.
To copy & paste the
Gantt dependencies
it must be set
CopyPasteInternal
or
since 13.3
there must be defined and copied column named "
id
" that contains the row ids
or
since 13.3
there must be copied column
IdNames
and
IdNames
must contain only one column and
FullId
must be
0
.
CanCopyPaste
[1]
If values can be copied from this column to clipboard by Ctrl+C and pasted to this column from clipboard by Ctrl+V.
If the column has
CanCopyPaste = 0
, it is ignored for both copying and pasting.
CanCopyPaste
[1]
If values can be copied from this row to clipboard by Ctrl+C and pasted to this row from clipboard by Ctrl+V.
0
Row cannot be copied and pasted.
1
Row can be copied and pasted.
2
Row can be copied and pasted only with its parent (when set
CopyPasteTree
).
3
Only for fixed row, the row is always copied when all rows are selected and copied or all variable rows are copied. By default it is set for main Header.
If and how there will be copied children of the rows.
If set to another value than
0
, it adds level information to beginning of the first cell, as count of characters U65279.
0
Does not copy tree.
1
Copies also visible children of expanded parents.
2
Copies also visible children of all parents.
3
Copies also all children.
4
(new 13.3)
Does not copy any children, but preserves the tree structure, if copied selected parent with children.
0
Copies cell values to system clipboard and pastes from system clipboard.
1
Copies cell values to TreeGrid global private cache, it will be available for all grids on page.
2
Copies cell values to TreeGrid local private cache, it will be available only for this grid.
0
Copies cell values, but no other row or cell attributes.
1
Copies row ids only. It should be set with CopyPasteInternal>0 to copy the whole rows internally, with all attributes. Copies always all cells.
2
(new 14.0)
Copies cell valuse and also row ids. If there are more grids on page, copies also grid id as the first cell. When pasting and the source row exists in the grid, makes a copy of this row.
3
(new 14.0)
Like
2
, but never copies the grid id. When pasting, it looks for the row only in the destination grid.
4
(new 14.0)
Like
3
, but never copies the row id. It stores the last copy and when pasting, it looks for the last copied row.
1.bit &
1
Copies and pastes also hidden columns. Affects
CopyCols
(0,3,4) and
PasteCols
(0,3,4,5).
2.bit &
2
Copies and pastes also hidden rows. Affects
CopyFocused
(1) and
PasteFocused
(1-12)
Copying to clipboard
Copying to clipboard can be done only by pressing
Ctrl
+
C
or
Ctrl
+
X
.
There is
no
API method to copy to clipboard due browser security restriction.
CopyFocused
[1]
It is applied only if
CopySelected
is 0 or if no row in grid is selected.
0
Never copy focused row.
1
Copy only focused rows.
2
Since 16.3
copy only focused rows and rows with
CanCopyPaste
=
3
20
Copy all visible variable rows in the same parent as focused row.
30
Copy all visible variable rows (if set
CopyPasteTree
, it affect only root rows, the other are handled by
CopyPasteTree
), copies also rows with
CanCopyPaste
=
3
.
31
Copy all variable rows (if set
CopyPasteTree
, it affect only root rows, the other are handled by
CopyPasteTree
), copies also rows with
CanCopyPaste
=
3
.
0
Copies only the cell value, never the
EFormula
.
1
If cell has the
EFormula
, it is copied internally to be pasted to TreeGrid. To clipboard there is always copied the cell value.
2
If cell has the
EFormula
, it is copied internally and also to clipboard with '=' prefix. If pasted outside TreeGrid, the formula cell references are
not
updated!
1
All visible columns
2
All columns
3
(new 11.0)
Only focused cell range or all visible columns for selected rows
4
(new 11.0)
Only focused cell range or all columns for selected rows
How the excluded cells will be cleared.
0
- rows will be deleted.
1
- cells will be cleared.
2
-
(new 15.0)
cell values will be cleared.
CopyTime
[""]
Copying too many values to clipboard can be too slow and in this case the copying can fail, especially in IE and FF.
If the copying time exceeds this value (in milliseconds), the copying action is canceled and the user must press the Ctrl+C again to finish the copying.
The CopyTime can contain up to four values used for different browsers in this order: [all, IE, FF, Safari/Chrome].
Reasonable value is
"200,500,150,1000"
or
"150"
.
(
TGrid
grid
,
TRow
row
,
string
col
,
type
val
)
Called to get value for
copying
to clipboard by Ctrl+C.
val
is predefined/actual cell value, return
val
or new value.
new
6.4
API event
string
OnGetRowText
(
TGrid
grid
,
TRow
row
,
string[ ]
col
,
string
txt
,
bool
sel
)
Called to get the whole row text, without ending CRLF.
cols
are the cells to copy,
txt
is the default text to copy,
sel
is set if only selected cells are wanted.
Return new row text to copy to clipboard or
txt
.
The row text must
not
contain CRLF string.
new
6.0
<Actions>
Attached to event
OnCtrlC
, can be attached only to
OnCtrlC
or
OnCtrlX
Copies data to clipboard.
Action in the CtrlC and CtrlX events must return 0 to permit the default function, use zero after comma like "Copy,0".
new
6.0
<Actions>
Exclude
Attached to event
OnCtrlX
, can be attached only to
OnCtrlC
or
OnCtrlX
Copies data to clipboard and deletes the copied rows (only if all cells are copied) or if set
ExcludeClear
clears the copied cells.
Action in the CtrlC and CtrlX events must return 0 to permit the default function, use zero after comma like "Exclude,0".
(
TGrid
grid
,
string
txt
)
Called after the data for copy is generated.
txt
is data to be copied to clipboard.
Return null to use the original txt, empty string to suppress copying or new text to copy.
Pasting from clipboard
Pasting from clipboard can be done only by pressing
Ctrl + V
.
There is
no
API method to paste from clipboard due browser security restriction.
0
Never paste to selected rows.
1
Paste to selected rows/cells if any, otherwise paste to focused row according to
PasteFocused
.
If the pasted range is bigger, the remaining source rows/cells are discarded.
PasteFocused
[8]
It is applied only if
PasteSelected
is 0 or if no row in grid is selected.
0
Never paste to focused row.
1
To focused rows only, if the pasted range contains more rows, they are discarded.
2
To focused rows and to the next rows below, in the same parent only; if the pasted range contains more rows, they are discarded.
3
To focused rows and to the next rows below, including expanded children and parents; if the pasted range contains more rows, they are discarded.
4
To focused rows and new next rows are added after the focused rows.
5
Inserts one new row in front of the focused rows; if the pasted range contains more rows, they are discarded. The focused row itself is
not
changed.
6
Inserts new rows in front of the focused rows. The focused rows themselves are
not
changed.
7
Inserts one new row in front of the focused rows; if the pasted range contains more rows, they are discarded. The focused row itself is
not
changed.
If clipboard contains only one value, it pastes it to the actual focused cell.
8
Inserts new rows in front of the focused rows. The focused rows themselves are
not
changed.
If clipboard contains only one value, it pastes it to the actual focused cell.
9
(new 11.0)
To focused rows and to the next rows below, in the same parent only; if the pasted range contains more rows, they are added to end of the parent.
10
(new 11.0)
To focused rows and to the next rows below, including expanded children and parents; if the pasted range contains more rows, they are added to end of the grid.
(new 12.0)
If focused more cells, only to the focused rows, otherwise to focused rows and to the next rows below, in the same parent only; if the pasted range contains more rows, they are added to end of the parent. (=
1
or
9
).
Since 13.3
if the focused range contains last row in grid and pasted range contains more rows, they are added to the grid end.
12
(new 12.0)
If focused more cells, only to the focused rows, otherwise to focused rows and to the next rows below, including expanded children and parents; if the pasted range contains more rows, they are added to end of the grid. (=
1
or
10
).
Since 13.3
if the focused range contains last row in grid and pasted range contains more rows, they are added to the grid end.
20
Paste to all visible variable rows in the same parent as focused row.
21
Replace all siblings of focused row by the pasted rows.
30
Paste to all visible variable rows (if set
CopyPasteTree
, it affect only root rows, the other are handled by
CopyPasteTree
), pastes also to rows with
CanCopyPaste
=
3
.
31
Paste to all variable rows (if set
CopyPasteTree
, it affect only root rows, the other are handled by
CopyPasteTree
) , pastes also to rows with
CanCopyPaste
=
3
.
32
Replace all variable rows with the pasted rows.
1
Paste to all visible columns.
2
Paste to all columns.
3
Paste to all columns right to the focused cell, including the focused one.
4
Paste from actually focused column or, if the data are longer than the rest right to the cursor, pastes from the first column (=
2
or
1
or
3
)
5
(new 12.0)
Paste to only focused columns (like
0
), if there are more focused cells. Otherwise like
4
.
0
Ignore the pasted children.
1
Fill the children to the existing children only, use settings from
CopyPasteTree
.
2
Replace the children, if required, delete remaining children or add new children, use settings from
CopyPasteTree
.
PasteNaN
[0]
If can be pasted value to cell that lead to NaN in cell, e.g. string to number cell.
0
- no, the cell will have original value.
1
- yes, the cell will get NaN value.
(default setting prior 14.0)
2
- empty, the cell will get empty or zero value.
If and how can be pasted values written to the cell.
If pasted value cannot be written to the cell, it is discarded (it is
not
written to the next cell).
0
The cell cannot accept pasted value.
1
The cell accepts pasted value only if it is editable. To the pasted value are applied EditMask, ResultMask and Size.
Since 10.0
cannot be pasted
not
existing value to Enum type cell.
It permits pasting any value to not editable cell with Defaults Button or to Select type cell and to cell with
SuggestType='Existing'
. Use ResultMask to restrict pasting some value here.
2
The cell always accepts the pasted value as is.
(
TGrid
grid
,
string[ ]
cols
,
string[ ]
pastedtext
)
Called before cell values are pasted by Ctrl+V from clipboard.
Return true to suppress default action.
pastedtext
is array of texts to paste into individual rows. You can modify this array.
cols
is array of column names only where will be pasting done. You can modify this array.
new
6.4
API event
bool
OnPasteRow
(
TGrid
grid
,
TRow
row
,
string[ ]
cols
,
string[ ]
values
,
bool
added
)
Called before the
values
are pasted to the row cells (
cols
).
The
cols
array should
not
be modified - it is used also in next pasted rows.
added
is set if the row was added by pasting.
Return true to cancel default behavior.
If true is returned and the row was added by pasting, it is
not
removed - must be removed by the handler!
new
6.4
API event
void
OnPasteRowFinish
(
TGrid
grid
,
TRow
row
,
string[ ]
cols
,
string[ ]
values
,
bool
added
)
Called after the
values
are pasted to the
row
cells (
cols
).
added
is set if the row was added by pasting.
new
12.0
API event
type
OnPasteValue
(
TGrid
grid
,
TRow
row
,
string
col
,
type
value
,
type
oldvalue
,
type[]
attrvalues
,
string[]
attrnames
,
object
errors
)
Called when pasting
value
to the cell.
oldvalue
is actual cell value.
Return new value to paste or
value
or
oldvalue
to
not
change the cell value.
It is possible to modify both the values in
attrvalues
and in
attrnames
.
For
errors
see
OnEditErrors
API event.