6 Answers, 1 is accepted
Also it seems the button will only show when RenderMode is Lightweight
Is this true?
You can configure the page layout in the print dialog options. There you can specify if the page should be printed in landscape or portrait orientation.
As for your second query - indeed the print button is shown when RenderMode is set to Lightweight.
Regards,
Viktor Tachev
Telerik
Thanks Viktor that seemed to work well
One more question
when adding the print button to a manually constructed Command Item Line what should it look like. I used the Refresh as a starting point and it did not work... thanks
<
telerik:RadButton
ID
=
"btnPrint"
runat
=
"server"
Text
=
"Print "
CommandName
=
"PrintGrid"
>
<
Icon
SecondaryIconCssClass
=
"rbPrint"
></
Icon
>
</
telerik:RadButton
>
In order to use a custom button for printing the grid you need to ensure that the ClientSettings-EnableClientPrint property is set to true first.
The button itself would look similar to the following:
<
CommandItemTemplate
>
<
asp:Button
Text
=
"Print"
runat
=
"server"
OnClientClick
=
"clientClick(); return false;"
/>
</
CommandItemTemplate
>
and the JavaScript:
function
clientClick() {
var
grid = $find(
"<%= RadGrid1.ClientID %>"
);
grid.print();
}
Regards,
Viktor Tachev
Telerik
when using the online demo in the Firefox browser
http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/printing/defaultcs.aspx
I change the page size to 20
then click the print button a pdf is the displayed showing all 20 items when I print I get only one page.
Also you have ExportSettings-IgnorePaging="true" yet when using the print button only what shows on screen is printed.
If there are limitations to the new print button are they explained anywhere?
Thanks
The print functionality is intended to print what is currently displayed in the grid. Note that this functionality is different than exporting.
If you would like to have all items printed you would need to show all records first and then click the Print button.
Regards,
Viktor Tachev
Telerik