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.
Unfortunately, activation email could not send to your email. Please try again.

Only change display order of columns without changing index

Thread ID:

Created:

Updated:

Platform:

Replies:

124621 Jun 18,2016 05:09 AM Jun 20,2016 02:30 AM Windows Forms 1
loading
Tags: GridControl
Rem Aza
Asked On June 18, 2016 05:09 AM

Say a grid has three columns
1-Id
2-Name
3-Price


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 ?

Piruthiviraj Malaimelraj [Syncfusion]
Replied On June 20, 2016 02:30 AM

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: 
 
Regards, 
Piruthiviraj 


CONFIRMATION

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.

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.

;