Skip to main content

dragItem

enables the possibility to reorder grid columns or (and) rows by drag and drop

dragItem?: "column", "row", "both";

Example

var grid = new dhx.Grid("grid_container", {    columns: [        // columns config    ],    dragItem: "both",    data: dataset});

Related sample: Grid. Drag-n-drop (Pro)

Drag-n-drop can work in three modes:

  • "column" - enables drag and drop of columns
  • "row" - enables drag and drop of rows
  • "both" - enables both modes mentioned above
Pro version only

This functionality requires PRO version of the dhtmlxGrid (or DHTMLX suite) package.
In case you use GPL version, you will be able to reorder rows only.

Change log:

  • added in v6.5.
  • The "row" and "both" modes have beed added in v7.2.