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 React Vue Other frameworks NodeJS server

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

Row adding and copying

TreeGrid documentation

Only variable rows can be added or copied.
Fixed (Head and Foot) and Space rows cannot be added or copied.

Ways of adding rows to grid

Adding new empty row
New empty row can be added by actions AddRow, AddChild and other Add... actions. These actions are usually attached to Toolbar Add and AddChild Button and also to CopyMenu menu.
By API can be new row added by AddRow method.
All the settings are described below in Adding new empty rows paragraph.
Copying existing row
Existing row can be copied by actions CopyRow, CopyTree, CopySelected and other Copy...action. These actions are usually accessible from CopyMenu menu.
It is possible to copy row only, copy row with children, copy row with children, but without values, copy selected rows - with or without children.
By API can be existing rows copies by CopyRows method.
All the settings are described below in Copying existing rows paragraph.
Copying existing row by dragging
Existing rows can be copied when dragging by actions DragCopy, DragSelectedCopy, DragCopyChildren. These actions are not attached to any event by default, because by default are rows moved by dragging.
The copying actions can be attached to OnDrag... events and replace DragRow, DragSelected and DragChildren events that move the rows.
All the settings are described in Row moving documentation.
Moving existing row from another grid by dragging
From another grid are rows move always as copy - from source grid are deleted (marked as Deleted) and added as new to the destination grid.
The dragging rows can be done by actions DragRow, DragSelected and DragChildren events. These actions are usually attached as default actions for dragging rows to OnDrag event.
By API can be rows moved from another grid by MoveRowsToGrid method.
All the settings are described in Row moving documentation.
Pasting row from clipboard
TreeGrid supports pasting new rows from clipboard. To clipboard can be rows copied from the grid, from another grid, or from another application like MS Excel.
The pasting is done by actions PasteTo... These actions are attached to CtrlV event and cannot be attached alsewhere.
All the settings are described in Copy&Paste documentation.

Adding and copying restrictions

By default every row accepts every child. Remember, only variable rows can be added or copied!
To control which row accepts which child use Def and AcceptDef attributes. The row accepts as child only rows with Def attribute listed in the row's AcceptDef array. The root rows are controlled by <Root AcceptDef/>.
The new empty row gets its Def attribute from CDef attribute of its parent. Root rows use <Root CDef/>. To restrict adding to row's children, set its CDef="". By default is CDef="R".
Dynamically you can control adding new rows by API event OnCanRowAdd.
All the settings are described in Default rows documentation.

Adding new empty rows

<Cfg> bool

Adding

[1]
If rows can be added into grid.
If set to 0, grid does not permit adding new rows, copying existing rows and pasting rows from clipboard, but it is still permitted moving rows from another grid.
If set to 0, it hides Toolbar buttons Add and AddChild. If set to 0 all Add... actions fail, but AddRow method still works.
new 6.4 <Cfg> string

AddFocusCol

When set, automatically focuses this column after the row is added.
If not set, the originally focused column is used.
new 14.0 <Cfg> string

AddFocusColEmpty

When set, automatically focuses this column after the row is added if no column is focused originally.
<I> bool

Added

[0]   Uploaded to server, support Undo
It is set to 1 when row has been added to the grid and not yet uploaded to server.
It is set to 1 for every type of adding the row (add empty, copy, drag copy, move from other grid, paste).
Added row is colored green (by default setting in Grid.css).
After uploading changes to server or calling AcceptChanges the added row just looses its state and becomes normal row.
The place where the row is added is identified by Parent, Next and Prev attributes.
<I> string

Parent

Uploaded to server
When the row is moved or added, this is id of the new parent row or position of page (from 0).
<I> string

Next

Uploaded to server
When the row is moved or added, this is id of the row below or "" if the row is the last row in its parent.
<I> string

Prev

Uploaded to server
When the row is moved or added, this is id of the row above or "" if the row is the first row in its parent.
<I> <Root> int

AddParent

[0]
If set, adds new row's children as its siblings rather than its children.
If is set to 1 adds new row before the row.
If is set to 2 adds new row as last child of the parent row.
For example, if you set AddParent of all rows and <Root> to 2, every new row will be added to the end of table, to the root.
<Actions>

AddRow ...FA

Attached to OnClickButtonAdd and OnIns and used in Toolbar Add and Panel Menu
Adds new empty row above actual or focused row.
<Actions>

AddRowBelow ...FA

Not attached to any event
Adds new empty row below actual or focused row.
upd 14.0 <Actions>

AddRowEnd

Attached to OnClickButtonAdd event and used in Toolbar Menu
Adds new empty row to the end of grid (when <Cfg AllPages='1'/>) or actual page (when <Cfg AllPages='0'/>).
There are also available actions AddRowEndGrid to add row to the grid end and AddRowEndPage to add row to actual page end.
It always creates brand new row and ignores EditAttrsEmpty attribute.
Since 14.0 it can be used with F suffix to add row to end of focused nested grid if any.
<Actions>

AddChild ...FA

Not attached to any event
Adds new empty row into actual or focused row's children to the beginning (as the first child).
<Actions>

AddChildEnd ...FA

Attached to OnClickButtonAddChild and OnCtrlIns and used in Toolbar AddChild and Panel Menu
Adds new empty row into actual or focused row's children to the end (as the last child).
new 12.0 <Actions>

AddRows ...FSARWO

Not attached to any event, used in Toolbar Add Menu
Adds new empty rows above actual row or focused range. It adds the same number of rows as the focused range contains. The suffixes FA control destination (the position to add), the suffixes SRWO control source (the count).
new 12.0 <Actions>

AddRowsBelow ...FSARWO

Not attached to any event
Adds new empty rows below actual row or focused range. It adds the same number of rows as the focused range contains.
The suffixes FA control destination (the position to add), the suffixes SRWO control source (the count).
new 12.0 <Actions>

AddSelected ...FSARWO

Not attached to any event
Adds new empty rows above actual or focused row. It adds the same number of rows as the selected rows. The suffixes FA control destination (the position to add), the suffixes SRWO control source (the count).
new 12.0 <Actions>

AddSelectedBelow ...FSARWO

Not attached to any event
Adds new empty rows below actual or focused row. It adds the same number of rows as the selected rows.
The suffixes FA control destination (the position to add), the suffixes SRWO control source (the count).
chg 12.0 upd 16.1 API event bool

OnCanRowAdd

(TGrid grid, TRow parent, TRow next)
Called before the row is added to find out if it can be added to this position.
It is called when adding new rows, copying existing rows and pasting rows. It is not called when moving rows from another grid.
parent is parent row in tree or page for root row, to its children the new row will be added.
next is next row, above it the new row will be added or null if the row will be added as the last child or last row on page.
Return false to restrict row adding. Since 12.0 returning null permits row adding.
Since 16.1 is possible to return array as [parent,next] to change to place where the row can be added.
API event void

OnRowAdd

(TGrid grid, TRow row)
Called after the row is added, but before it is displayed. Usually to change default values. Called from AddRow.
new 7.0 upd 14.0 API event void

OnRowAdded

(TGrid grid, TRow row, bool paste)
Called after the row is added and displayed.
Called also when the row is copied, but not moved from another grid by dragging (MoveRowsToGrid).
Since 14.0 the paste is set if calling when pasting row.
upd 7.0 API method TRow

AddRow

(TRow parent, TRow next, int show = 0, string id = null, string Def = null)
Adds new empty row to grid and returns it.
If show&1, the new row is also displayed, for false there must be called ShowRow method to display it.
(new 7.0) If show&2, the parents are expanded to show the row.
(new 7.0) If show&4, the row is recalculated, including Gantt chart.
(new 7.0) Call with show = 7 to completely show the row.
parent is parent row, next is row below the new row. If next is null adds new row as the last parent's child. If parent and next are null adds row as the last root row.
Also sets values to new row from its default row (according to CDef attribute of parent row).
If set id, sets it to id attribute, otherwise creates new unique id for the row.
If set Def, uses this Def as Default row name.
Only variable row can be added.
new 12.0 API method TRow[ ]

AddRows

(int count, TRow parent, TRow next, bool focus = 0, bool test = 0)
Adds count of variable rows to given position (parent and/or next) and returns an array of them. Or returns null for error. Since 15.0 for backward compatibility if set count = 0 it adds one row and returns it.
If set focus, focuses the newly added rows, preserves the focused columns.
If set test = 1, does not add the rows, just test if it is possible and returns true or null.
Uses AddRow and also calls OnCanRowAdd and OnRowAdded API events and alerts error if the row cannot be added to given position.

Copying existing rows

<Cfg> bool

Copying

[1]
If existing rows can be copied / duplicated.
If set to 0, the Panel Copy button is hidden and the CopyMenu does not display items for copying.
If set to 0, all Copy... actions fail but CopyRow and CopyRows methods still work.
(Since 10.0) If set to 0, the rows cannot be copied by dragging.
Copying is automatically disabled when set Adding='0'.
It is not related to Copy&Paste, it is controlled by Pasting.
new 6.4 <Cfg> bool

CopyDeleted

[0]
If copies also deleted rows.
upd 6.0 <I> bool

CanCopy

[1]
If the row can be duplicated and copied.
If set to 0, the Panel Copy button is inactive and all Copy... actions fail but CopyRow and CopyRows methods still work.
The row cannot be also copied by dragging.
It is not related to copying values into clipboard.
upd 12.0 <Header> bool

CanCopy

[0]
Deprecated since 12.0. Use Panel Buttons or Panel value instead to define the panel buttons for header row.
If the Header Panel Copy button is enabled. Header row itself can never be never copied.
<I> string

Copy

Uploaded to server
This attribute is set when used ChildPaging=3 and the row was created as deep copy of another row, the Copy is id of the source row.
This attribute is set only if the source row has some children and they were not loaded from server yet (the row was not expanded yet).
The server script must provide deep copy of the children of source (Copy) node to children of this (id) node.
upd 6.0 <C> bool

Copy

[0]
If the default Panel button Copy / CopyAll is visible. This button is hidden also if <Cfg Copying="0"/>. This button is inactive when the row has CanCopy='0'.
Click to this button shows popup menu for copying and adding rows. The menu is defined by attribute PanelCopyMenu.
Used only if the Panel Buttons and the cell value are not set.
<Actions>

CopyRow ...FA

Not attached to any event, but used in Toolbar Add and Panel CopyMenu
Copies actual or focused row, the new row is placed above the source row.
new 6.0 <Actions>

CopyRowBelow ...FA

Not attached to any event
Copies actual or focused row, the new row is placed below the source row.
<Actions>

CopyTree ...FA

Not attached to any event, but used in Toolbar Add and Panel CopyMenu
Copies actual or focused row with all its children, the new row is placed above the source row.
new 6.0 <Actions>

CopyTreeBelow ...FA

Not attached to any event
Copies actual or focused row with all its children, the new row is placed below the source row.
<Actions>

CopyEmpty ...FA

Not attached to any event, but used in Toolbar Add and Panel CopyMenu
Copies actual or focused row with all children, but without their cell values, the new row is placed above the source row.
new 6.0 <Actions>

CopyEmptyBelow ...FA

Not attached to any event
Copies actual or focused row with all children, but without their cell values, the new row is placed below the source row.
new 12.0 <Actions>

CopyRows ...FARO

Not attached to any event, but used in Toolbar Add CopyMenu
Copies all focused rows, the new rows are placed above actual row or the focused range.
new 12.0 <Actions>

CopyRowsBelow ...FARO

Not attached to any event
Copies all focused rows, the new rows are placed below actual row or the focused range.
new 12.0 <Actions>

CopyRowsTree ...FARO

Not attached to any event, but used in Toolbar Add CopyMenu
Copies all focused rows with all their children, the new rows are placed above actual row or the focused range.
new 12.0 <Actions>

CopyRowsTreeBelow ...FARO

Not attached to any event
Copies all focused rows with all their children, the new rows are placed below actual row or the focused range.
new 12.0 <Actions>

CopyRowsEmpty ...FARO

Not attached to any event, but used in Toolbar Add CopyMenu
Copies all focused rows with all children, but without their cell values, the new rows are placed above actual row or the focused range.
new 12.0 <Actions>

CopyRowsEmptyBelow ...FARO

Not attached to any event
Copies all focused rows with all children, but without their cell values, the new rows are placed below actual row or the focused range.
<Actions>

CopySelected ...FARO

Not attached to any event, but used in Toolbar Add and Panel CopyMenu
Copies selected rows and places them above actual or focused row.
It copies only rows that can be copied in the location. It fails if no selected row can be copied to the location.
<Actions>

CopySelectedChild ...FARO

Not attached to any event, but used in Toolbar AddChild and Panel CopyMenu
Like CopySelected, but copies the rows as the first children of actual or focused row.
<Actions>

CopySelectedChildEnd ...FARO

Not attached to any event, but used in Toolbar AddChild and Panel CopyMenu
Like CopySelected, but copies the rows as the last children of actual or focused row.
<Actions>

CopySelectedTree ...FARO

Not attached to any event, but used in Toolbar Add and Panel CopyMenu
Like CopySelected, but copies the selected rows with all their children.
<Actions>

CopySelectedTreeChild ...FARO

Not attached to any event, but used in Toolbar AddChild and Panel CopyMenu
Like CopySelectedTree, but copies the rows as the first children of actual or focused row.
<Actions>

CopySelectedTreeChildEnd ...FARO

Not attached to any event, but used in Toolbar AddChild and Panel CopyMenu
Like CopySelectedTree, but copies the rows as the last children of actual or focused row.
<Actions>

CopySelectedEmpty ...FARO

Not attached to any event, but used in Toolbar Add and Panel CopyMenu
Like CopySelected, but copies the selected rows with all their children, but without their cell values.
<Actions>

CopySelectedEmptyChild ...FARO

Not attached to any event, but used in Toolbar AddChild and Panel CopyMenu
Like CopySelectedEmpty, but copies the rows as the first children of actual or focused row.
<Actions>

CopySelectedEmptyChildEnd ...FARO

Not attached to any event, but used in Toolbar AddChild and Panel CopyMenu
Like CopySelectedEmpty, but copies the rows as the last children of actual or focused row.
upd 6.0 <Actions>

CopySelectedEnd

Not attached to any event, but used in Toolbar AddChild and Panel CopyMenu
Like CopySelected, but copies the selected rows to end of grid (when <Cfg AllPages='1'/>) or actual page (when <Cfg AllPages='0'/>).
There are also available actions CopySelectedEndGrid to copy to the grid end and CopySelectedEndPage to copy to actual page end.
upd 6.0 <Actions>

CopySelectedTreeEnd

Not attached to any event, but used in Toolbar AddChild and Panel CopyMenu
Like CopySelectedEnd, but copies the selected rows with all their children.
There are also available actions CopySelectedTreeEndGrid to copy to the grid end and CopySelectedTreeEndPage to copy to actual page end.
upd 6.0 <Actions>

CopySelectedEmptyEnd

Not attached to any event, but used in Toolbar AddChild and Panel CopyMenu
Like CopySelectedEnd, but copies the selected rows with all their children, but without their cell values.
There are also available actions CopySelectedEmptyEndGrid to copy to the grid end and CopySelectedEmptyEndPage to copy to actual page end.
deleted 12.0 <Actions>

CopyMenu ...F

Attached to OnClickPanelCopy, OnClickButtonAdd and OnClickButtonAddChild
Replaced by ShowMenu action.
Shows popup menu for copying or adding rows. From this menu can be available all adding and copying actions listed above.
The menu items displayed are set by column or row attribute CopyMenu. The menu items captions are set in Text.xml.

new 6.0 deleted 12.0 <Panel><Space cell> string[ ]

CopyMenu

[...]
Replaced by Menu attribute.
What items (and their order) will be available in menu displayed by CopyMenu action - this actions attached to Panel Copy button and Toolbar Button Add and AddChild by default.
upd 6.4 API event void

OnRowCopy

(TGrid grid, TRow row, TRow source, bool empty)
Called after the row is copied, but before it is displayed. row is the copied row, source is the source row. empty is true if values were not copied.
Since 6.4 it is called also when pasting new row if set CopyPasteRows=1.
new 6.4 upd 10.0 API event bool

OnRowCopyId

(TGrid grid, TRow row, TRow source, bool move)
Called before creating id for the new copied row, the row has already copied the IdNames columns, the other columns will be copied later.
Since 8.1 it can set the row id and return true to not generate the new id.
Since 10.0 move is set when the row is moved from another grid.
chg 7.0 API method TRow

CopyRow

(TRow row, TRow parent, TRow next, bool deep = false, bool empty = false)
Copies one row inside grid. Returns the row copy.
row is the row to copy, it can be also from another grid,
parent is parent row, next is row below the copied row. If next is null, places the row as the last parent's child. If parent and next are null, places row as the last root row.
If deep is true, copies include children, only visible (not filtered, not deleted).
Copies all row and cell attributes. Does not copy RowSpan.
Since 7.0 it also shows all the changes and tests if the copy is possible due Def / AcceptDef settings.
chg 7.0 upd 12.0 API method TRow[ ]

CopyRows

(TRow[ ] rows, TRow parent, TRow next, bool deep = false, bool empty = false, bool focus = false)
Copies all given rows inside grid. Shows all changes.
rows is array of the rows to copy in this order. The rows can be also from another grid.
parent is parent row, next is row below the copied rows. If next is null, places the rows as the last parent's children. If parent and next are null, places rows as the last root rows.
If deep is true, copies include children, only visible (not filtered, not deleted).
(since 12.0) If set focus, focuses the newly added rows, preserves the focused columns.
Copies all row and cell attributes. Does not copy RowSpan.
Uses AddRow and also calls OnCanRowAdd and OnRowAdded API events.
(since 12.0) Returns all new added rows (but no their children). Or null for error.
In 7.0 was removed parameter dest_grid and rows now can become from another grid.