I have a question about dhtmlxGrid. The documentation ta


I
have a question about dhtmlxGrid.


The documentation talks about columns that can be dragged. I see that
the column widths can be set by dragging, but I would like to change the column
order by dragging, i.e.


column1 column2 column3


can be changed by dragging to:


column2 column1 column3


Is this possible?<o:p></o:p>


Yes,
it is possible by using enableColumnMove method.


For
example:


grid.enableColumnMove(true,list_of_Columns)


//list_of_Columns

  • list of movable columns (all by default)


 


There
is a moveColumn method(oldIndex,newIndex) method which moves column from
oldIndex to newIndex position.


 


To
use this functionality, you need to include:


                dhtmlxGrid_mcol.js


(
available in pro version only )


 
Please
refer to

                samples/pro_grid_moveCol.html