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

Export to PDF with RadGrid Hierarchy.

2 Answers 36 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ronak
Top achievements
Rank 1
Ronak asked on 15 Sep 2011, 01:01 PM
Hi,

I have RadGrid  with Hierarchy value .
It is easy to allow me export to PDF.

But my problem is that i want to show my Parent data & Child data in one block in PDF or if it is possible then i want to change parent background color in PDF (not child background color) because i want to show them like this parent has this child.

I have attached two images.

So, how it can be possible??
if any one knows, please reply as soon as possible.  

thank you,
Ronak 

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 15 Sep 2011, 01:15 PM
Hello Ronak,

Try the following code snippet to change header background color on export to PDF.
C#:
protected void RadGrid1_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
{
  if (e.CommandName == RadGrid.ExportToPdfCommandName)
  {
   GridHeaderItem HeaderItem = (GridHeaderItem)RadGrid1.MasterTableView.GetItems(GridItemType.Header)[0];
   HeaderItem.BackColor = System.Drawing.Color.Red;
  }
}

Thanks,
Princy.
0
Ronak
Top achievements
Rank 1
answered on 16 Sep 2011, 05:44 AM

Hi Princy ,

Thanks for your reply.

But as you can see given images, I want to change grid data item  background color (i.e.only for Parent data not for child data item).

Is It possible??

Thank You,
Ronak
Tags
General Discussions
Asked by
Ronak
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Ronak
Top achievements
Rank 1
Share this question
or