New Print Button

7 posts, 0 answers
  1. Ken
    Ken avatar
    18 posts
    Member since:
    Nov 2010

    Posted 05 May Link to this post

    Is there any way top have the new print button create the PDF in landscape?

    Thanks

  2. Ken
    Ken avatar
    18 posts
    Member since:
    Nov 2010

    Posted 05 May Link to this post

    Also it seems the button will only show when RenderMode is Lightweight

    Is this true?

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 10 May Link to this post

    Hello Ken,

    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
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  5. Ken
    Ken avatar
    18 posts
    Member since:
    Nov 2010

    Posted 12 May in reply to Viktor Tachev Link to this post

    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>

     

  6. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 17 May Link to this post

    Hi Ken,

    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
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  7. Ken
    Ken avatar
    18 posts
    Member since:
    Nov 2010

    Posted 19 May in reply to Viktor Tachev Link to this post

    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

     

     

  8. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 20 May Link to this post

    Hello Ken,

    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
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017