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.

columns order

Thread ID:

Created:

Updated:

Platform:

Replies:

39985 Jan 23,2006 07:10 AM Feb 10,2016 08:29 AM Windows Forms 4
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On January 23, 2006 07:10 AM

Hello everybody, Could you please help on how can i change the order of columns in all of the syncfusion grids, for example, i have this order, col1,col2,col3 .... coln and i want to move to the other order : col7,col2,coln,col3,.......col1 i have already used moverange method withing a complex algo, but it takes time to change the order, Thank you very much

stanleyj [Syncfusion]
Replied On January 24, 2006 04:47 AM

Hi, Moving columns programmatically using MoveRange to order does not seems to be very slow. Here is a rough sample. If you like column order to be serialized, refer How do I save column order and column width preferences of my user . Regards, Stanley

Administrator [Syncfusion]
Replied On January 24, 2006 07:09 AM

Thanks a lot Stanley, Greate, it does works very well, it''s excaclty what i need, Thank you very much Regards, >Hi, > >Moving columns programmatically using MoveRange to order does not seems to be very slow. Here is a rough sample. >If you like column order to be serialized, refer How do I save column order and column width preferences of my user . > >Regards, >Stanley

QLT User
Replied On February 9, 2016 06:23 PM

cant find the rough sample mentioned in the response. where is it located ?

Pavithra Kodiyarasan [Syncfusion]
Replied On February 10, 2016 08:29 AM

Hi,

Thank you for using syncfusion product,

You can change the Column order by using Following methods:

Controlleroptions:

This property used to provide the support for mouse controller on the GridControl.

Code Snippet:
this.gridControl1.ControllerOptions = Syncfusion.Windows.Forms.Grid.GridControllerOptions.DragColumnHeader;

DragColumnHeader option enables a mouse controller that provide support for dragging column headers within the grid by clicking on a header and dragging it to a new position.

MoveRange():
This method is used to moves a range of rows and columns.

Code snippet:
this.gridControl1.Cols.MoveRange(6, 2, 1); //Move Column 6 and 7 to the 1st column position.

Sample:
http://www.syncfusion.com/downloads/support/forum/39985/ze/WindowsFormsApplication1-407124893

Regards,
Pavithra K.

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.

;