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

printing generates "value does not fall within the expected range" exception

1 Answer 41 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jerry Kurata
Top achievements
Rank 1
Jerry Kurata asked on 05 Aug 2010, 04:56 PM
Hi,

I am trying to print a grid using the code from the demo and I generate a "value does not fall within the expected range" exception.  The exception occurs in this routine, on the e.PageVisual = Printcanvas line.

private void doc_PrintPage(object sender, PrintPageEventArgs e)
        {
            e.PageVisual = Printcanvas;

            if (PrinttotalHeight == 0)
            {
                PrinttotalHeight = PrintGridView.DesiredSize.Height;
            }

            Canvas.SetTop(PrintGridView, -PrintoffsetY);

            PrintoffsetY += e.PrintableArea.Height;
            e.HasMorePages = PrintoffsetY <= PrinttotalHeight;
        }

Any ideas why this occurs?

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 06 Aug 2010, 06:37 AM
Hello,

 Can you verify if Printcanvas is not child of another element?

Best wishes,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Jerry Kurata
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or