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

Printing all tabs at once

6 Answers 169 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Joseph
Top achievements
Rank 1
Joseph asked on 14 Aug 2017, 06:53 PM

We have an ASP.Net application that is contains a tab control with several tabs. At one time, when you would do Print from the browser, it would print all the tabs at once. That no longer works now. Neither of the code snippets help...

@media print 
{
    .k-tabstrip .k-content
    {
        display: block;
    }
}

...or...

<style type="text/css" media="print">
        .rmpHiddenView {
            display: block !important;
        }

        #NavigationTab, #btnNew, #btnSave, #QRDiv, .hidePrint, #cboChecklists, #cboJobsWithChecklists {
            display: none;
        }        
    </style>

Here is the code we're using to get the tabs set up...

<telerik:RadTabStrip ID="NavigationTab" runat="server" SelectedIndex="0" MultiPageID="NavigationTabPages">
                    <Tabs>
                        <telerik:RadTab runat="server" Text="Shop" Owner="NavigationTab" PageViewID="ShopPageView"></telerik:RadTab>
                        <telerik:RadTab runat="server" Text="Testing" Owner="NavigationTab" PageViewID="TestingPageView"></telerik:RadTab>
                        <telerik:RadTab runat="server" Text="Testing Coordinator" Owner="NavigationTab" PageViewID="TestingCoordinatorPageView"></telerik:RadTab>
                        <telerik:RadTab runat="server" Text="Punch List" Owner="NavigationTab"></telerik:RadTab>
                        <telerik:RadTab runat="server" Text="Shipping" Owner="NavigationTab" PageViewID="ShippingPageView"></telerik:RadTab>
                        <telerik:RadTab runat="server" Text="Notes" Owner="NavigationTab" PageViewID="NotesPageView"></telerik:RadTab>
                        <telerik:RadTab runat="server" Text="QR Code" Owner="NavigationTab" PageViewID="QRPageView" Visible="False"></telerik:RadTab>
                    </Tabs>
                </telerik:RadTabStrip>
                <telerik:RadMultiPage ID="NavigationTabPages" runat="server" SelectedIndex="0">
                    <telerik:RadPageView ID="ShopPageView" runat="server" >

Any thoughts about what might be causing this?

 

 

6 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 15 Aug 2017, 02:11 PM
Hi,

What has happened to your project that breaked the Print export?

I am not sure how your CSS solution works, but there is a demo which shows how to print the pages content of RadTabStrip in separate pages which could be suitable for your scenario: https://demos.telerik.com/aspnet-ajax/client-export-manager/functionality/pdf-multi-page-export/defaultcs.aspx

The solution is based on RadClientExportManager which allows you to export the content to PDF and PNG formats.

Regards,
Rumen
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Joseph
Top achievements
Rank 1
answered on 15 Aug 2017, 02:36 PM

Hi Rumen,

I'm not sure what happened either. Unfortunately, I can't use your solution due the amount of code that I would have to change. One interesting thing...when I do a search on the whole solution for the word "rmpHiddenView", it doesn't return any results. Should it be that way?

 

0
Rumen
Telerik team
answered on 16 Aug 2017, 11:07 AM
Hi,
The .rmpHiddenView class is applied to page views that are hidden. You can modify it to 

   <style type="text/css">
      html .rmpHiddenView {
           display: block;
       }
   </style>

and test again.

Other possible solutions are provided in the forums:
http://www.telerik.com/forums/printing-multiple-radpage-views-on-one-click
http://www.telerik.com/forums/printer-friendly-pageview

Kind regards,
Rumen
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Joseph
Top achievements
Rank 1
answered on 16 Aug 2017, 02:57 PM
I tried that early on...still doesn't work.
0
Accepted
Marin Bratanov
Telerik team
answered on 21 Aug 2017, 02:28 PM

Hello Joseph,

Does adding the !important modifier help?

The following works for me:

<style type="text/css">
    @media print
    {
        div.rmpHidden.rmpView
        {
            display: block !important;
        }
    }
</style>
<telerik:RadTabStrip runat="server" ID="rts1" MultiPageID="rmp1">
    <Tabs>
        <telerik:RadTab Text="first" Selected="true"></telerik:RadTab>
        <telerik:RadTab Text="second"></telerik:RadTab>
    </Tabs>
</telerik:RadTabStrip>
<telerik:RadMultiPage runat="server" ID="rmp1">
    <telerik:RadPageView ID="rpv1" runat="server" Width="100%" Selected="true">content part one</telerik:RadPageView>
    <telerik:RadPageView ID="rpv2" runat="server" Width="100%">second part of the content</telerik:RadPageView>
</telerik:RadMultiPage>

Regards,

Marin Bratanov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Joseph
Top achievements
Rank 1
answered on 22 Aug 2017, 02:01 PM
That works...thanks for your help!
Tags
TabStrip
Asked by
Joseph
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Joseph
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or