This is a migrated thread and some comments may be shown as answers.
Exporting rad combo boxes to PDF
7 Answers 9 Views
This is a migrated thread and some comments may be shown as answers.
Helen
Top achievements
Rank 1
Helen asked on 21 Sep 2015, 05:04 PM

I am trying to get a nice export of may page to PDF.  I have several rad combo boxes that control the content of various areas of the page.

All the rad combo boxes are empty in the PDF - is there anyway around this? I was trying to use them a titles and I don't really want to have to repeat the selected value of the radcombobox in to a literal control next to each one - just so I can tell what I'm looking at in the PDF.

Thanks 

 

7 Answers, 1 is accepted

Sort by
0
Helen
Top achievements
Rank 1
answered on 23 Sep 2015, 09:17 AM
See the attached images of the empty combo box in the pdf
0
Daniel
Telerik team
answered on 23 Sep 2015, 02:37 PM
Hello Helen,

What product is used for generating this PDF file? It looks like it is the ClientExportManager for ASP.NET AJAX, but could you please confirm this?
ClientExportManager demo

Regards,
Daniel
Telerik
0
Helen
Top achievements
Rank 1
answered on 23 Sep 2015, 03:19 PM

Yup,  I'm using your client export manager for ajax:

 

<telerik:RadClientExportManager runat="server" ID="RadClientExportManager1">
    <PdfSettings MarginBottom="20mm" MarginLeft="15mm" MarginTop="15mm" MarginRight="15mm" Author="SequoiaOnTarget" FileName="SequoiaOnTarget" />
</telerik:RadClientExportManager>

  

function exportPDF() {
            $find('<%=RadClientExportManager1.ClientID%>').exportPDF($("#pdfExportArea"));
        }

<telerik:RadButton runat="server" OnClientClicked="exportPDF" AutoPostBack="false" CssClass="btn btn primary">
   <ContentTemplate>
      <span class="glyphicon glyphicon-download glyphicon-margin-right"></span>PDF
   </ContentTemplate>
</telerik:RadButton>

thanks
0
Daniel
Telerik team
answered on 25 Sep 2015, 07:31 AM
Hello Helen,

Please test whether the following code works properly at your side. If it behaves as expected, can you help me to reproduce the issue by modifying it?
<asp:ScriptManager runat="server" />
<script type="text/javascript">
 
    function exportPDF() {
        $find('<%=RadClientExportManager1.ClientID%>').exportPDF($telerik.$("#pdfExportArea"));
    }
 
</script>
<div>
 
    <div id="pdfExportArea">
        <telerik:RadComboBox ID="RadComboBox1" runat="server">
            <Items>
                <telerik:RadComboBoxItem Text="Item 1" />
                <telerik:RadComboBoxItem Text="Item 2" />
            </Items>
        </telerik:RadComboBox>
 
        <telerik:RadDropDownList ID="RadDropDownList1" runat="server">
            <Items>
                <telerik:DropDownListItem Text="Item 1" />
                <telerik:DropDownListItem Text="Item 2" />
            </Items>
        </telerik:RadDropDownList>
    </div>
 
    <telerik:RadButton runat="server" OnClientClicked="exportPDF" AutoPostBack="false"  Text="PDF">
    </telerik:RadButton>
 
    <telerik:RadClientExportManager runat="server" ID="RadClientExportManager1">
        <PdfSettings MarginBottom="20mm" MarginLeft="15mm" MarginTop="15mm" MarginRight="15mm" Author="SequoiaOnTarget" FileName="SequoiaOnTarget" />
    </telerik:RadClientExportManager>
 
</div>

Regards,
Daniel
Telerik
0
Helen
Top achievements
Rank 1
answered on 25 Sep 2015, 02:21 PM

From your code - RadComboBox1 doesn't work but RadDropDownList1 does. Screen shots attached.

I'm using master pages so I have as RadAjaxManagerProxy on my page. Otherwise I just copied your code in.  

At the moment I think I could use dropdown lists - not the combo box for this particular page, but it would be good to get a solution for the comboboxes.

Thanks

  

 

0
Helen
Top achievements
Rank 1
answered on 25 Sep 2015, 02:38 PM
Just tried to add asp checkboxlists too. Similar problem - I can't see the checkboxes in the pdf, I only see the words.
0
Kostadin
Telerik team
answered on 30 Sep 2015, 09:58 AM
Hi Helen,

I am afraid this is a limitation of ClientExport manager. The reason is that the content of the following elements is not rendered: <iframe>, <svg>, <input>, <textarea>, and CheckBox controls and RadComboBox are rendered as <input> elements. More information about the control limitations could be found in the following help article.

Regards,
Kostadin
Telerik
Asked by
Helen
Top achievements
Rank 1
Answers by
Helen
Top achievements
Rank 1
Daniel
Telerik team
Kostadin
Telerik team
Share this question
or