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. Image for the cookie policy date

Only change display order of columns without changing index

Say a grid has three columns

Is it possible to change the display order to Name,Price,Id without changing the index of the columns using move ?

so after changing the display order I should still be able to access the column Price using index 3.

Is this possible ?

1 Reply

PM Piruthiviraj Malaimelraj Syncfusion Team June 20, 2016 06:30 AM UTC

Hi Remmie, 

Thank you for using Syncfusion Products. 

We had analyzed your reported scenario. By default, the index of the column or row index will be changed to moved positions in the GridControl. So the column values can only get by accessing the currently viewed GridControl column index.  
Please make use of the below code snippet to drag and drop the columns, 
Code snippet: 
//To allow the DragDrop 
this.gridControl1.ControllerOptions = GridControllerOptions.DragColumnHeader; 
//To get the cellvalue 
object value = this.gridControl1[rowIndex,ColIndex].CellValue; 
UG Link: 

Live Chat Icon For mobile
Up arrow icon