This is a migrated thread and some comments may be shown as answers.

Print all the columns in the same page when we do Print Preview.

0 Answers 70 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Narendra
Top achievements
Rank 1
Narendra asked on 09 Jun 2011, 07:27 AM
Hello Team,

Here we have a Telerik gridview and around 25 no. of columns is there. The problem is when we view Print Preview the output appears but not exactly what we expected. The 1st page take few columns and the rest goes to 2nd page and rest one goes to 3rd page but if we have 4 rows in a grid along with 25 columns, then the result must appear on the same page after the first best fit columns on the same page. 

Please see below the logic of Print Preview-

public
static void PrintPreview(GridViewDataControl source, bool modal)
        {
            var window = new Window { Title = "Print Preview" };
            var dialog = new PrintDialog();
            var document = source.ToPrintFriendly().ToFixedDocument(dialog);
            var documentViewer = new DocumentViewer
            {
                Document = document
            };
            window.Content = documentViewer;
            if (modal)
                window.ShowDialog();
            else
                window.Show();
        }

I have tried the given link in the forum and customise the logic but no luck to achieved what we expected as a output-
Here's link- http://www.telerik.com/community/code-library/wpf/gridview/radgridview-print-and-print-preview.aspx

Kindly help me out to over come this issue.

Regards,
Naren



  

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Narendra
Top achievements
Rank 1
Share this question
or