How to add summary row while Printing?

Hi,
When a grid is added to another grid as this.grid1.Controls.Add(grid2).

And in the printview i'm able to see only grid1.
How to print grid2 along with grid1.

For Example
------------

I have a grid 'A', in which i have a column 'Amount'.

I have another grid 'B' which contains only one row.

At the end of Grid 'A' i am showing GridSummaryRow of 'B' which performs Sum(amount).

And the Grid 'B' is added to Grid 'A' as
this.A.Controls.Add(B);

Now while printing i want grid 'A' above grid 'B'.

Thankyou
Raghavendra.

2 Replies

HA haneefm Syncfusion Team April 12, 2007 03:27 PM UTC

Hi Raghavendra,

This can be acheived by deriving the GridPrintDocument and overriding OnPrintPage Method. Here you can customize it according to your needs.

Here is a sample.
printtwogridsonsamepage.zip

Best regards,
Haneef


RA Raghav April 13, 2007 04:19 AM UTC

Thank you Haneef,

The example give by you works fine for two grids.

Sorry to say, in the above example 'B' is a GridControl and grid 'A' is GridControlBase.

And we are adding this Gridcontrol 'B' to GridControlBase 'A' as

A.Controls.Add(B);

GridControl 'B' is used for showing summary values of Grid A columns.

Now while printing i want grid 'A' along with summary value row i.e Gridcontrol 'B'.


Thankyou
Raghavendra

Loader.
Up arrow icon