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.

GridHierarchyLevel column spanning

Thread ID:





73472 May 8,2008 01:13 AM May 13,2008 11:50 PM Windows Forms 4
Tags: GridControl
Administrator [Syncfusion]
Asked On May 8, 2008 01:13 AM


I've been trying to create a grid with multiple hierarchy levels. I've so far been successful by using GridHierarchyLevel.

However, I'm having difficulties with the display of the child rows as the columns of the children and the parent are different.

First level grid has the following columns:
"A", "B", "C", "D", "E"
While the second level has the following columns:
"X", "Y"

How would you align the columns in such way that "X" spans "B" and "C" and gets aligned underneath them? I hope the following digram illustrates my question clearly:

|"A"|" B "|" C "|"D"|"E"|
| |" X "|"Y"| |

Any help would be greatly appreciated!

Thank you in advance,


Administrator [Syncfusion]
Replied On May 8, 2008 04:05 AM


Looks like the white spaces I had in the diagram were stripped out by HTML.

It was meant to look like the following:

Administrator [Syncfusion]
Replied On May 13, 2008 10:33 AM

Hi Kelvin,

Thanks for the interest in Syncfusion Grid.

You can merge the rows so that it shows as a single row. You can merge the cells of columns 'X' and 'Y' and make them a single row.

Please refer the following code snippet that shows how we can merge the cells.

this.gridDataBoundGrid1.Model.CoveredRanges.Add(GridRangeInfo.Cells(1, 2, 1, 4));
this.gridDataBoundGrid1.Model.CoveredRanges.Add(GridRangeInfo.Cells(4, 2, 4, 4));
this.gridDataBoundGrid1.Model[1, 2].HorizontalAlignment = GridHorizontalAlignment.Center;

Please refer the sample in the below link that illustrates the above.


If I have misunderstood your requirement, could you please explain me in detail, so that I can work in depth and try to send a better solution?


Administrator [Syncfusion]
Replied On May 13, 2008 08:57 PM

Thank you Asem. Exactly what I was looking for!

Administrator [Syncfusion]
Replied On May 13, 2008 11:50 PM

Hi Kelvin,

Thanks for the update.



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.