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

ExportToPDF With RadtreeList USeStaticHeader ives error message

3 Answers 76 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Yelena
Top achievements
Rank 1
Yelena asked on 16 Jun 2014, 07:12 PM
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

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 17 Jun 2014, 08:18 AM
Hi Yelena,

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

Thanks,
Princy.
0
Yelena
Top achievements
Rank 1
answered on 19 Jun 2014, 06:56 PM
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
0
Accepted
Princy
Top achievements
Rank 2
answered on 20 Jun 2014, 03:34 AM
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.
Tags
TreeList
Asked by
Yelena
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Yelena
Top achievements
Rank 1
Share this question
or