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

GDBG moveRange HeaderRows

Thread ID:





68582 Sep 25,2007 09:48 AM UTC Sep 26,2007 04:50 AM UTC WinForms 1
Tags: GridControl
Simon Kakon
Asked On September 25, 2007 09:48 AM UTC

How can i swap 2 headers rows ?


Jisha Joy [Syncfusion]
Replied On September 26, 2007 04:50 AM UTC

Hi Sim,

Thank you for your interest in Syncfusion products.

There is no direct way to swap row headers.But it can be achieved by handling the event PrepareViewStyleInfo in GriddataBoundGrid and swaping the Cellvalues of row headers.
Here is the code snippets:

void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventArgs e)
if (e.RowIndex == 0 && e.ColIndex > 0)
e.Style.CellValue = gridDataBoundGrid1[1, e.ColIndex].CellValue;

if (e.RowIndex == 1 && e.ColIndex > 0)
e.Style.CellValue = gridDataBoundGrid1[0, e.ColIndex].CellValue;


Please refer the sample in the link to illustrate this:

Please try this and let me know if you have any questions.



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