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

Export to PDF

4 Answers 101 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Asra
Top achievements
Rank 1
Asra asked on 20 Jun 2009, 02:06 PM
Hi All,

I am trying to export to PDF on the grid. This Export to PDF button is displayed on the top the Grid using the Property Display On top.
But this is rendering me as a plain PDF Document, where nothing is  displayed. Along with Export to PDF i even have a button for Export to Excel for which the grid is exported on the excel. I have a Grid with 3 levels of Hireachy.

Iam using the licensed version of the telerik.

Can any one pls let me why Export to PDF is not Working.

One more issue i even buttons for Expand All. when clciked on this button all the child level grids should be expanded. This button is also placed on the top of the Grid. In this iam unable to find the Inner Grid on the Item Command Event.
Can any one pls let me know how to identify the InnerGrid on Item Command Event.

Pls its very urgent .

Any help form you guys really help us in going ahead.

Regards,
Asra

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 22 Jun 2009, 06:03 AM
Hi Asra,

I guess all the buttons for exporting and Expanding are placed in the CommandItemTemplate of the Grid. Try the following code snippet to expand/collapse the entire Grid on a single button click.

CS:
 
protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) 
    { 
        
        if (e.CommandName == "ExpandAll"
        { 
            foreach (GridDataItem item in RadGrid1.MasterTableView.Items) 
            { 
                item.Expanded = !item.Expanded; 
                if (item.HasChildItems) 
                { 
 
                    GridNestedViewItem childitem = (GridNestedViewItem)item.ChildItem; 
                    foreach (GridDataItem innerchildItem in childitem.NestedTableViews[0].Items) 
                    { 
 
                        innerchildItem.Expanded = !innerchildItem.Expanded; 
                    }   
 
                } 
            } 
        } 
    } 

Export to Pdf must be working fine. I am not sure what is happening on your end. Try setting the ExportOnlyData property to true and see whether the Grid is getting exported correctly.

Thanks
Shinu.
0
Deepa Balasundaram
Top achievements
Rank 1
answered on 25 May 2010, 09:45 PM
Hello

I want to export the Edit/Update FormTemplate to PDF. Is there any way to do this?

Thanks,
Deepa
0
Daniel
Telerik team
answered on 28 May 2010, 05:27 PM
Hello Deepa,

It is not possible to export the Edit form out-of-the-box. Let me know if you need more information.

Best regards,
Daniel
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Deepa Balasundaram
Top achievements
Rank 1
answered on 28 May 2010, 05:28 PM
OK. I have started using Telerik Reports to achieve what I wanted.

Deepa
Tags
Grid
Asked by
Asra
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Deepa Balasundaram
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or