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

Print A Paged Grid Solutions?

3 Answers 18 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Fred
Top achievements
Rank 1
Fred asked on 27 May 2010, 08:36 PM
I have a grid with say 5 pages of rows in a Rad Window.

What have others done to print all the rows in the grid?  Currently I have a javascript print button that prints using the GetRadWindow().GetContentFrame().contentWindow.print(); function.  Of course this only gets the rows in the first page.

Any solutions? I'm trying to avoid a print preview popup over the popup.  Maybe printer friendly version that reloads page with no paging and prints? not sure if that's possible or a good idea.

3 Answers, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 27 May 2010, 09:18 PM
Hello Fred,

You could use the following approach:
Print RadGrid contents

Additionally I attached a modified version of the CL project that can be used as a base for implementing this functionality.

Kind regards,
Daniel
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.
0
Fred
Top achievements
Rank 1
answered on 27 May 2010, 10:01 PM
Thanks. Almost works. Grid on popup window shows no paging, but also grid on the main page now shows with no paging as well once I click the print button. so when I go back to the page paging is gone.  Going to play around with it, but pretty close solution.

What if I'm not using an Ajax Panel or do I have too?
0
Daniel
Telerik team
answered on 31 May 2010, 09:58 PM
Hello Fred,

You could try to fire custom command that resets the pagesize on the server:
$find('<%= RadGrid1.ClientID %>').get_masterTableView().fireCommand("ResetPageSize");

void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
{
    if (e.CommandName == "ResetPageSize")
    {
        ...
    }
}

Best regards,
Daniel
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
Grid
Asked by
Fred
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Fred
Top achievements
Rank 1
Share this question
or