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.

How to add summary row while Printing?

Thread ID:

Created:

Updated:

Platform:

Replies:

59392 Apr 12,2007 04:00 AM Apr 13,2007 12:19 AM Windows Forms 2
loading
Tags: GridControl
Raghav
Asked On April 12, 2007 04:00 AM

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.

haneefm [Syncfusion]
Replied On April 12, 2007 11:27 AM

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

Raghav
Replied On April 13, 2007 12:19 AM

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

CONFIRMATION

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.

;