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. Image for the cookie policy date
close icon

Dynamically created and merged headers

Hi,

I would like to make a grid in the likeness of the picture in the attachment. I'm trying to do that with a GridDataBoundGrid (but can be with any kind of grid).

My problem is, the columns are created dynamically, and the dates on the header and the number of columns will be different depending on the parameters passed when i create the grid, and i can't merge the upper part of the header, where is a description above the dates in the header. I need the description to be centered above betweens the dinamically created dates.



grid_c561c020.zip

3 Replies

SR Sri Rajan Syncfusion Team July 8, 2008 05:17 AM UTC

Hi Daniel,

Thank you for your interest in syncfusion products.

You can use the GridControl to achive this behaviour. Please refer the browser samples under below category, Which show you how to set various cell styles.

Grid Samples-->Appearance

Path In Disc:
\My Documents\Syncfusion\EssentialStudio\{Version Number}\Windows\Grid.Windows\Samples\2.0\Appearance

Please try this and let me know if this helps.

Best Regards,
Srirajan.




DS Daniel Santos de Carvalho July 8, 2008 03:45 PM UTC

Hi, Srirajan

I saw the example, but i wanted the make that with a two rows header, the upper row must merge (as a title) but the lower row must contain the separate columns with the dates and values in the grid.

The example, had merged grid cells, but i don't show how to do that with the header. Can you help me with that.



SR Sri Rajan Syncfusion Team July 9, 2008 02:39 PM UTC

Hi Daniel,

Thank you for your Continued interest in Syncfusion products.

Here is the code to merge cells in the Top Row Header.

this.gridControl1.Model.Rows.HeaderCount = 1;
this.gridControl1.Model.CoveredRanges.Add(GridRangeInfo.Cells(0, 0, 0, 5));
this.gridControl1[0, 0].Text = "Test";

Please let me know if this helps.

Best Regards,
Srirajan.


Loader.
Live Chat Icon For mobile
Up arrow icon