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

[Solved] Cell Content is overlap while export to PDF

4 Answers 733 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dharmesh
Top achievements
Rank 1
Dharmesh asked on 01 Jun 2011, 03:01 PM
Hello Everyone,

I am using export to pdf feature in one of my grid.
Now my problem is data is overlapped in two columns while export to pdf file.

I had faced similar behavior while displaying rad grid and corrected by using following property
<MasterTableView TableLayout="Auto">
<ClientSettings>
      <Resizing ClipCellContentOnResize="false">
</ClientSettings>
</MasterTableView>

So my data overlap into 2 columns each other is resolved but similar issue i am facing while export same content to pdf

Seems rad grid not reading columns properties while exporting.

So any one have idea how to resolve it?

Regards,

Dharmesh

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 02 Jun 2011, 06:25 AM
Hello Dharmesh,

Try setting the width of columns in ItemCommand event to avoid overlapping to cell contents when exporting to pdf. Hope this helps you.

C#:
protected void RadGrid2_ItemCommand(object sender, GridCommandEventArgs e)
{
     if (e.CommandName == "ExportToPdf")
   {
   GridColumn column = RadGrid2.MasterTableView.GetColumn("ColumnUniqueName");
  column.HeaderStyle.Width = Unit.Pixel(300);
   }
}

Thanks,
Princy.
0
Dharmesh
Top achievements
Rank 1
answered on 02 Jun 2011, 07:13 AM
Hello Princy,

Thanks for reply.

But my issue is that I do not have column name as i am binding DataSet to grid run time which is populated run time.

So when I click on pdf export button I can not determined which column will cut in PDF version.

So is there any alternate solutions that we can apply in PDF export ?

Regards,

Dharmesh
0
Katie Arnott
Top achievements
Rank 1
answered on 09 Apr 2013, 07:47 PM
Has anyone found a solution for this? I am currently having the same issue.

Thanks,
Katie
0
Kostadin
Telerik team
answered on 12 Apr 2013, 02:04 PM
Hello Dharmesh and Katie,

Basically there are several ways to avoid this behavior:

1) To make sure that you have an empty space in the text - this way RadGrid will be able to wrap the content in several lines.
2) To reduce the font size / use narrower fonts
3) To decrease the page margins
4) To increase the page size

All the best,
Kostadin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Dharmesh
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Dharmesh
Top achievements
Rank 1
Katie Arnott
Top achievements
Rank 1
Kostadin
Telerik team
Share this question
or