News in version
TreeGrid Gantt chart SpreadSheet Examples Documentation Download Development Licensing Prices References Contacts Buy Try it free
Live examples
Grids and tree grids

Complex grid - the first one Large table with paging Large table without paging Multiline & images - books Positions and spanning Photo album - images Dynamic Adobe Flash Dynamic MS SilverLight PivotTable - 2D grouping Schools - list and ratings File and directory browser Extended JavaScript API Sharing & synchronisation 1 000 000 rows, 1 000 cols

Sheets (new)

Microsoft Excel sheet TreeGrid sheet

Gantt and bar charts

Gantt & Network chart Simple Gantt chart Big Gantt chart - 1000 rows Gantt chart tree by grouping Resources usage chart Run chart - bar chart Grouping bars - run groups Line chart and XY charts

Live grid tutorials
Basic (rows and columns)

1. Basic grid 2. Rows 3. Columns 4. Default rows, columns 5. Rows manipulation 6. Rows identification

Cells (types, formats, edit)

1. Edits - inputs & multiline 2. Combos & checkboxes 3. Html, links, imgs, buttons 4. Space buttons & tabs 5. Permissions & validation 6. Cell CSS style & color 7. Conditional formatting 8. Custom controls & editing 9. Events & custom dialogs 10. Column & row spanning 11. Dynamic cell spanning

Tree (rows, columns, groups)

1. Row tree 2. Column tree 3. Grouping rows to tree

Sorting rows

1. Sorting rows

Filter and search

1. Filtering rows 2. Filtering in tree 3. Search & advanced filters

Dragging

1. Dragging rows 2. Dragging between grids 3. Dragging external tag

Paging (rows, tree, columns)

1. Client root paging 2. Client child paging 3. Client column paging 4. All client paging 5. Adding pages dynamically 6. Server root paging 7. Server child paging 8. All server paging

Master and detail

1. Nested detail simple 2. Nested detail tables 3. Master detail simple 4. Master detail tables 5. Master detail more tables 6. Master detail in tree 7. Master detail trees

Calculations (cell formulas)

1. Calculated columns 2. Calculated rows 3. Calculation order 4. Calculated rows in tree 5. Calculation order in tree 6. Calculated attributes

Live Sheet tutorials
Sheet features (new)

1. Row and column Index 2. Auto size (auto adding pages) 3. Row & column manipulation 4. Cell manipulation 5. Cell style 6. Editable formulas (ids&names) 7. Editable formulas (indexes) 8. Cell format 9. Outside edit

Live Gantt tutorials
Main bar (Gantt chart)

1. Main bar 2. Discrete main bar 3. Main bar plans 4. Summary tasks

Run bar (Bar chart)

1. Run array definition 2. Run JSON definition 3. Run summary definition 4. Run drag 5. Run groups & API 6. Run bar as task 7. Run box as task 8. Network diagram 9. Run join and drag

Flags and points

1. Flags 2. Points

Display, zoom, paging

1. Header & background 2. Zoom 3. Paging 4. Synchronizing more Gantts

Dependencies & scheduling

1. Constraints 2. Dependencies 3. Schedule tasks 4. Critical path

Calendars

1. Calendars exclude

Resources

1. Resources 2. Availability

1. Dragging and copying rows

Moving and copying rows by dragging and by panel button inside one grid

Changes to be sent to server
  • See Row moving and dragging documentation, Default rows documentation and Five ways of adding rows to grid documentation.
  • Example description


    Move row with children by dragging by left mouse button, copy row by dragging by right mouse button and copy row with children by dragging by ctrl+right mouse button.
    You can copy row with or without its children or add new row above the row by clicking to button on row panel or on toolbar. You can add new child to focused row by clicking button on toolbar.
    You can outdent or indent focused row by clicking buttons on toolbar. It works the same as dragging the row to given position.
    You can copy focused row or selected rows to clipboard by ctrl+c. You can paste the row(s) in clipoard to selected rows or, if no row is selected, to new row(s) before focused row by ctrl+v.
    Select more rows (by panel button) or by space key or by dragging by ctrl+left mouse button and drag or copy them together.

  • Dragging permissions


    By default all rows can be dragged. Set <I

    CanDrag

    ='0'/> to suppress row dragging (it suppresses both moving and copying by dragging).
    By default all rows can be copied. Set <I CanCopy='0'/> to suppress row copying (by dragging and by panel/toolbar buttons).
    For whole grid suppress dragging all rows by <Cfg Dragging='0' />, suppress copying all rows by <Cfg Copying='0'/>
    Dragging permissions can be also controlled dynamically and more preciselly by API event

    OnStartDrag

    , e.g. to suppress only particular row moving and not copying.
  • Dropping permissions

    are controlled by attributes Def and AcceptDef.

    Def

    is default row. It has more features, from the default row are read all attributes and values not set directly in the row. Every row can have only one default row, but default row can have also its default row to inherit its values from it.

    AcceptDef

    specifies which rows can be dropped or copied to this row as children. Only row its Def attribute value is listed in the target row AcceptDef can be dropped or copied to row.
    There is also related attribute CDef for adding new child rows. When added new child to the row, it will have its Def attribute set to parent CDef value. Setting CDef to empty restricts adding new children to the row.
    Dropping permissions can be also controlled dynamically by API event

    OnCanDrop

    .
    For whole grid suppress dropping all rows by <Cfg Dropping='0' /> - it has sense for coping from another grid.
  • Changing Def


    Def attribute of the target row can be automatically changed in case the row without children gets its first child (Def is set to DefParent value) and when the row with children loses its last child (Def is set to DefEmpty value).
    Def attribute can be changed also dynamically by API method ChangeDef in OnEndDrag API event.
    When the Def is changed, there is called OnChangeDef API event. Here you can do any custom action, e.g. change the def or mark the row changed to upload the changed Def to server.
  • Dragging actions


    There are various dragging action to differ if row will be moved, copied or copied with its children. And if the row will be moved/copied single or all selected rows will be processed.
    The actions are DragRow, DragCopy, DragCopyChildren, DragSelected, DragSelectedCopy, DragSelectedCopyChildren.
    These actions can be attached to mouse dragging events differ by mouse button and key prefix, like OnDragRow, OnRightDragRow, OnCtrlDragRow, OnCtrlRightDragRow and so on.
    Moving row(s) is possible also by dragging Move button to row panel. The button can be shown by <Panel Move='1'/>. These events can be similarly to set to the dragging actions, e.g. OnDragPanelMove or OnRightDragPanelMove.
    There are also special actions to increase and decrease the row level Indent and Outdent. They work the same as the row is dragged.
    The actions are assigned to events in <Actions/> tag. Default actions are assigned in file Grid/Defaults.xml.
  • Copying actions


    • For copy row(s) by dragging see previous paragraph.
    • There are many actions for copying actual, focused or selected rows, see their list in documentaion Copying existing rows.
      The Add... and Copy... actions are attached to the Add and AddChild toolbar buttons.
      And also to Panel Copy button that can be shown by <Panel Copy='1'/>.
    • Rows can be also copied and pasted via clipboard, see documentation for Copy & paste via clipboard.
  • API


    There are various API events called for dragging. In OnEndDrag do custom action on drop. In OnRowMove do the custom action after the row is moved.
    Rows can be moved also by API method MoveRow. Other API methods and events are listed in documentation Row moving and dragging.
  • Save changes to server


    • Moved rows are marked by

      Moved

      attribute, Moved='1' means moved inside its parent and Moved='2' moved to new parent. Moved='1' is used only when sorting is disabled (Sorting='0').
      Copied and added rows are marked by

      Added

      attribute. The copied row contains no information about the source row. Only in server child paging, copied row with not yet loaded children gets attribute Copy as id of the source row.
      The Moved and Added attributes are set in upload data, in the <Changes> tag. It is set also to the row and can be read by API. It is cleared after sucessful save.
      See XML structure sent to server documentation
    • Moved row in upload data has set also attributes Parent, Next and Prev as ids of these rows to identify the new position of the row. Parent is empty for root row.
    • If set <Cfg FullId='1'/>, the row id contains also parent row id to identify the row position in tree by the id.
      When the row is moved to another parent, the id is updated after the change is successfuly saved to server.
      You can set <bdo Upload_Flags='NewId'> to upload the new id to server in NewId attribute.
      See Row id in tree