GridHierarchyLevel column spanning
Hello,
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.
Example:
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,
Kelvin
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.
Example:
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,
Kelvin
SIGN IN To post a reply.
4 Replies
AD
Administrator
Syncfusion Team
May 8, 2008 08:05 AM UTC
Whoops,
Looks like the white spaces I had in the diagram were stripped out by HTML.
It was meant to look like the following:
+|"A"|"___B___"|"_C_"|"D"|"E"|
|___|"_______X_____"|"Y"|___|
Looks like the white spaces I had in the diagram were stripped out by HTML.
It was meant to look like the following:
+|"A"|"___B___"|"_C_"|"D"|"E"|
|___|"_______X_____"|"Y"|___|
AD
Administrator
Syncfusion Team
May 13, 2008 02:33 PM UTC
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.
Please refer the sample in the below link that illustrates the above.
http://websamples.syncfusion.com/samples/Grid.Windows/F73472/main.htm
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?
Regards,
Asem.
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.
http://websamples.syncfusion.com/samples/Grid.Windows/F73472/main.htm
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?
Regards,
Asem.
AD
Administrator
Syncfusion Team
May 14, 2008 12:57 AM UTC
Thank you Asem. Exactly what I was looking for!
AD
Administrator
Syncfusion Team
May 14, 2008 03:50 AM UTC
Hi Kelvin,
Thanks for the update.
Regards,
Asem.
Thanks for the update.
Regards,
Asem.
SIGN IN To post a reply.
- 4 Replies
- 1 Participant
-
AD Administrator
- May 8, 2008 05:13 AM UTC
- May 14, 2008 03:50 AM UTC