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

RadGrid Export To PDF Rows displaying on two pages

4 Answers 143 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jeremiah
Top achievements
Rank 1
Jeremiah asked on 16 Apr 2014, 04:56 PM
I have a Rad Grid that exports to PDF. There are several columns in the grid. Most of the data is only a couple words and is displayed on one line.  However, there is a comments column that sometimes is long and wraps to several lines. My issue is when this is the last row. The export starts the row on one page and continues it on the next page. Is there a way to have only complete rows on a page?

4 Answers, 1 is accepted

Sort by
0
Jeremiah
Top achievements
Rank 1
answered on 16 Apr 2014, 05:19 PM
I have attached an image showing the grid.
0
Princy
Top achievements
Rank 2
answered on 17 Apr 2014, 06:42 AM
Hi Jeremiah,

One solution to this can be, on export you can set the width of the columns as shown below:

C#:
protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
{
  if (e.CommandName == RadGrid.ExportToPdfCommandName)
  {
    foreach (GridColumn col in RadGrid1.MasterTableView.RenderColumns)
    {
      RadGrid1.MasterTableView.GetColumn(col.UniqueName).HeaderStyle.Width = Unit.Pixel(100);
    }
  }
}

OR I recommend that you try the suggestions (How to fit XX columns on my page?) listed in the Q&A section in the PDF documentation:
PDF export help topic

Thanks,
Princy
0
Jeremiah
Top achievements
Rank 1
answered on 17 Apr 2014, 03:44 PM
Thanks for the reply Princy. All of the columns are already fitting on one page because I set the width of the column in the code, as you described.  I need rows to be complete on each page, not half on one page and half on another. I need the row to drop to the next page so only a full row of data is displayed each time.
0
Eyup
Telerik team
answered on 21 Apr 2014, 07:44 AM
Hi Jeremiah,

I've already replied in your ticket with ID:811215. In case the problem remains, please send us a runnable sample demonstrating the issue as requested.

Regards,
Eyup
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Jeremiah
Top achievements
Rank 1
Answers by
Jeremiah
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Eyup
Telerik team
Share this question
or