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

Hierarchical grid, export to PDF Error with Custom Expand/Collapse Column

1 Answer 101 Views
Grid
This is a migrated thread and some comments may be shown as answers.
gc_0620
Top achievements
Rank 1
gc_0620 asked on 25 Aug 2011, 08:39 PM
Update:

Telerik Please close this issue. I was able to able to fix it as suggested by Princy.

Basically, in Pre-Render event I hide the Default Expand/Collapse Column and rest I followed based on below link.


http://www.telerik.com/community/forums/aspnet-ajax/grid/gridexpandcolumn-expandimageurl-and-buttontype.aspx


Thanks Telerik and Princy.

gc_0620

___________________________________________________________________________________________

Folks using VS 2010 with RadGrid for ASP.Net Ajax 2011 V2.

I have a Hierarchical grid, Master Table HierarchyLoadMode="Client".

If use use expand/collapse Expand/Collapse ImageUrl from a File via ColumnCreated event, I got the attached error message while exporting to PDF. But If i do not call Column created event in Radgrid thus by using default Expand/Collapse ImageURL, the PDF export works fine. Also if  I use HierarchyLoadMode=Server or ServerOnDemand and call ColumnCreated event, export works fine. 
 
Any help appreciated..

Thanks

gc_0620

protected void RadGrid1_ColumnCreated(object sender, GridColumnCreatedEventArgs e)
    {
        if (e.Column is GridExpandColumn)
        {
            (e.Column as GridExpandColumn).ButtonType = GridExpandColumnType.ImageButton;
  
            (e.Column as GridExpandColumn).ExpandImageUrl = "~/Images/grd_SinglePlus.gif";
            (e.Column as GridExpandColumn).CollapseImageUrl = "~/Images/grd_SingleMinus.gif";
  
        }
    }
 protected void Export_to_PDF_Click(object sender, System.EventArgs e)
    {
  
        RadGrid1.ExportSettings.ExportOnlyData = false;
        RadGrid1.MasterTableView.HierarchyDefaultExpanded = true;
        RadGrid1.ExportSettings.OpenInNewWindow = true;
           
        RadGrid1.MasterTableView.ExportToPdf();
    }

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 26 Aug 2011, 04:56 AM
Hello,

I suppose this issue arises since you have DIV element with specified dimensions or absolute positioning. Check the following help documentation which explains more about this.
PDF export.

Thanks,
Princy.
Tags
Grid
Asked by
gc_0620
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or