ExportToPDF With RadtreeList USeStaticHeader ives error message

4 posts, 1 answers
  1. Yelena
    Yelena avatar
    14 posts
    Member since:
    Jan 2013

    Posted 16 Jun 2014 Link to this post

    I have these settings for radtreelist object
    RadGrid1.ClientSettings.Scrolling.AllowScroll = true;
    RadGrid1.ClientSettings.Scrolling.UseStaticHeaders = true;

    When I use ExporttoPDF features Adobe gives me error message, that pdf is not valid
    ExportTOCSV is working fine


    Could you give me some advise what I Can do in the code or the settings to have this nice feature
    UseStaticHeaders and able to Export to PDF without any issue.

    Thanks
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 17 Jun 2014 in reply to Yelena Link to this post

    Hi Yelena,

    With reference to this forum thread, you have to set Scrolling-UseStaticHeaders as false to work Export to PDF.

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Yelena
    Yelena avatar
    14 posts
    Member since:
    Jan 2013

    Posted 19 Jun 2014 in reply to Princy Link to this post

    thank you.  I have another question:
    RadTreeList is expanded.
    Then User change filters and I have code RadtreeList1.CollapseAllItems()

    All Items collapsed but button shows as expand and user should click twice:  first - to return button to collapse status and next time to expand.

    Let me know, please what I have to put in my code to show collapse button after I have CollapseAllItems()

    Thanks
  5. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 19 Jun 2014 in reply to Yelena Link to this post

    Hi Yelena,

    Such an issue is not expected please take a look into the sample code snippet which works fine at my end. Please provide your code if it doesn't help.

    ASPX:
    <telerik:RadTreeList ID="RadTreeList1" runat="server" DataKeyNames="EmployeeID" ParentDataKeyNames="ReportsTo" AutoGenerateColumns="false" DataSourceID="SqlDataSource1" PageSize="5" ClientDataKeyNames="EmployeeID" AllowMultiItemSelection="true">
        <Columns>
            <telerik:TreeListSelectColumn HeaderStyle-Width="38px" UniqueName="EmployeeID">
            </telerik:TreeListSelectColumn>
            <telerik:TreeListBoundColumn DataField="EmployeeID" HeaderText="EmployeeID" HeaderStyle-Width="80px">
            </telerik:TreeListBoundColumn>
            <telerik:TreeListBoundColumn DataField="LastName" HeaderText="LastName" >
            </telerik:TreeListBoundColumn>
            <telerik:TreeListBoundColumn DataField="ReportsTo" HeaderText="ReportsTo">
            </telerik:TreeListBoundColumn>
        </Columns>
    </telerik:RadTreeList>
    <telerik:RadButton ID="rbtnCollapse" runat="server" Text="Collapse" OnClick="rbtnCollapse_Click">
    </telerik:RadButton>

    C#:
    protected void rbtnCollapse_Click(object sender, EventArgs e)
    {
        RadTreeList1.CollapseAllItems();
    }

    Thanks,
    Princy.
Back to Top