We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Get column order after reorder.

Thread ID:





132624 Sep 12,2017 03:28 PM UTC Sep 13,2017 09:51 AM UTC JavaScript 1
Tags: ejGrid
Asked On September 12, 2017 05:17 PM UTC

I am using this event for column reorder:
columnDrop: function (args) { 
I need column id, which I can get with args.column.id (because I add this property to the columns when Grid is created), but I need and new order/place of the column or all columns with new order, but in args there is nothing for that.
How to get and column order with Syncfusion Grid ?

Renjith Singh Rajendran [Syncfusion]
Replied On September 13, 2017 09:51 AM UTC

Hi Customer, 

Thanks for contacting Syncfusion support, 

We have analyzed your query. We have achieved your requirement by using the “actionComplete” event of Grid. Please refer the sample below 

             actionComplete: function (args) { 
                  if(args.requestType == "reorder") 
                       if(i + 1 != args.model.columns[i].id ) 
                       args.model.columns[i].id = i + 1 
             columns: [ 
                         { field: "OrderID",id:1, isPrimaryKey: true, headerText: "Order ID", textAlign: ej.TextAlign.Right, width: 90 }, 

We have also prepared a JSPlayground sample, please refer the sample below 

Please refer the documentation link below, 

Renjith Singh Rajendran. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon