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

Pdf Export - Why border around <td>?

6 Answers 174 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Vivek
Top achievements
Rank 2
Vivek asked on 20 May 2013, 06:18 AM
Hi,

Exporting data to pdf file which is forming border around <td> tag even if "boarder:0px" has been used, please let us know the resolution to get rid of this border around <td>.

In OnPdfExporting, if we access e.RowHtml, there formatting is correct but while exporting it's creating border around <td>, trying to figure it out why it's happening.

Please let me know If you already have any idea / solution to fix this.

6 Answers, 1 is accepted

Sort by
0
Vivek
Top achievements
Rank 2
answered on 20 May 2013, 12:15 PM
in e.RowHtml if we try to view the Html, It looks fine but finally in pdf, it creates thick border around each <td> tag.
Not sure, where the html is getting modified after firing OnGridPdfExporting event.

One more thing, we're using runat="Server" attribute with each table row <tr> and <table>, is it causing the issue?

Please let me know the solution for this problem.
0
Vivek
Top achievements
Rank 2
answered on 21 May 2013, 02:30 AM
Still hoping updates on this.
0
Kostadin
Telerik team
answered on 23 May 2013, 06:18 AM
Hi Vivek,

You could try to set the RadGrid's GridLines property to None. Check out the following code snippet:
<telerik:RadGrid ID="RadGrid1" GridLines="None" runat="server">

If that did not proves helpful could you please provide us with your code declaration in order to investigate the issue further.

Regards,

Kostadin
Telerik
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.
0
Vivek
Top achievements
Rank 2
answered on 24 May 2013, 12:59 PM
Grid line is already set to None but no success.

As a second option, we tried explicitly setting border to none or 0px solid #ffffff, but no luck, problem still persist- 

private void FormatGridCells(GridItem item)
       {
           if (item is GridHeaderItem)
           {             
               
               foreach (TableCell cell in item.Cells)
               {
                   cell.Style["border"] = "none";
               }
           }
           if (item is GridItem)
           {              
               foreach (TableCell cell in item.Cells)
               {
                   cell.Style["border"] = "0px solid #ffffff";
               }               
           }
           item.PrepareItemStyle();
       }

 This is really critical to resolve, please reply asap.

Attached the snap shot for your reference, please have a look.
0
Vivek
Top achievements
Rank 2
answered on 27 May 2013, 03:51 PM
Still hoping resolution on this, please reply.
0
Kostadin
Telerik team
answered on 29 May 2013, 08:24 AM
Hi Vivek,

I prepared a small sample where no border are set to the exported table and attached it to this forum post. Please give it a try and let me know how it differs from your real setup.

Regards,
Kostadin
Telerik
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
General Discussions
Asked by
Vivek
Top achievements
Rank 2
Answers by
Vivek
Top achievements
Rank 2
Kostadin
Telerik team
Share this question
or