Click here to Skip to main content
13,258,007 members (78,382 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I am working in silverlight and i have one Grid with many Rows.
In My Grid Row there are many control for display purpose.
Now i want to print this Grid with all row.
I found many solution for PrintDocument in Silverlight but it print only first page multiple time.

My code is like,
void btnPrint_Click(object sender, RoutedEventArgs e)
       PrintDocument pd = new PrintDocument();
       pd.PrintPage += new EventHandler<PrintPageEventArgs>(pd_PrintPage);
void pd_PrintPage(object sender, PrintPageEventArgs e)
      e.PageVisual = grdMain;
      e.HasMorePages = true;

When i add e.HasMorePages = true that time it will going to infinite loop and does not print.

Please help me...
Posted 7-Aug-12 20:29pm
Kenneth Haugland 8-Aug-12 1:39am
You'll have to set the printarea to include hte whole table, not only whats visible.
Savalia_Manoj 8-Aug-12 1:57am
Thanks Kenneth Haugland for Reply.
But how to set PrintArea in Silverlight?
Christian Amado 10-Aug-12 9:55am
@Savalia_Manoj Solutions helped to you?
Savalia_Manoj 13-Aug-12 0:28am
Thanks Christian Amado,
I want to print multiple page not single page.This link gives single page example.Please give me multiple page link if you know.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.171114.1 | Last Updated 9 Aug 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100