Skip to main content


Pro version only

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

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

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


const 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

Change log:

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