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

Export to PDF and table borders

4 Answers 534 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Karl
Top achievements
Rank 1
Karl asked on 01 Dec 2011, 06:07 PM
Hi,
I have a radgrid with a table in which has border=0 for layout then a nested table with borders, however when it exports to pdf the border appears on all the tables? 

Any ideas how I can remove the border on first layout table please?

Karl

<telerik:RadGrid ID="rgPowerTrain" Skin="Sitefinity" EnableEmbeddedSkins="false" AutoGenerateColumns="false"
    GridLines="None" BorderStyle="None" runat="server" OnNeedDataSource="rgPowerTrain_NeedDateSource"
    CssClass="DealSheetRadGrid" Visible="true" OnItemDataBound="rgPowerTrain_ItemDataBound" 
    ItemStyle-BorderStyle="None">
    
    <ExportSettings IgnorePaging="true" OpenInNewWindow="true">
        <Pdf PageHeight="297mm" PageWidth="210mm" PageTopMargin="0mm" PageLeftMargin="10mm"
            PageRightMargin="10mm" AllowModify="false" AllowCopy="false" Author="Finning (UK)"
            PageBottomMargin="25mm" Creator="Finning (UK)" />
    </ExportSettings>
    <MasterTableView TableLayout="Fixed" BorderStyle="None" EditMode="InPlace" Width="550"
        Font-Names="Arial Unicode MS" Visible="true" Font-Size="10px" BorderWidth="0">
        <Columns>
            <telerik:GridTemplateColumn ItemStyle-Width="600">
                <ItemTemplate>
                      <h3 style="text-align:center;"><u>EPP Warranty Certificate</u></h3>  
                      <h4 style="text-align:center;">Powertrain Cover - Heavy Construction (HC)</h4>
                       <uc1:EPPCertHeader runat="server" ID="EppCertHeader1" /> 
                       <p><strong>Power train coverage covers components on the machine that are used to produce, transmit, engine horsepower for the purpose of moving the machine against defect in material and workmanship.</strong></p>
                      <table width="550" border="0" rules="none" frame="void" style="border:none">
                      <col />
                      <tr>
                        <td>
                                            
                       <table width="550" border="1"  >
                       <colgroup span="2"></colgroup>
                       <tr>
                            <td>
                               <h4 style="text-align:center;"> Components covered:</h4>
                               <ul style="margin-left:15px;">
                                <li><b style="font-weight:bold">Basic Engine </b>– including engine components essential to engine operation e.g. Fuel Pump, Water pump, Turbo, Governor and Engine Control Module.</li>
                                <li><strong style="font-weight:bold">Transmission </strong>– including pump and hydraulic controls.</li>
                                <li><strong>Torque Converter / Divider</strong></li>
                                <li><strong>Drive Line </strong>– including shafts and Universal Joints.</li>
                                <li><strong>Differential</strong></li>
                                <li><strong>Transfer Gear Group</strong></li>
                                <li><strong>Drive Axles</strong></li>
                                <li><strong>Final Drives</strong></li>
                                <li><strong>Hydraulic Drive Pumps and Motors</strong></li>
                                <li><strong>Brake Components</strong> – if used to provide steering</li>
                                <li><strong>Steering Clutch Components</strong></li>
                                <li><strong>Differential Steering Components</strong></li>
                                <li><strong>Vibratory Components</strong></li>
                                <li><strong>Rotor Drive Mechanism</strong></li>
                                <li><strong>Electronic Controls</strong></li>
                               </ul>
                            <p><i>A complete list of covered components is available upon request at your local Finning branch.</i></p>
                            </td>
                            <td>
                                <h4 style="text-align:center;">Excluded Components</h4>
                                <ul style="margin-left:15px;">
                                    <li><strong>Radiator</strong></li>
                                     <li><strong>Engine Attachments</strong> – Alternator, Starter, Air Compressor and the Air Conditioning Compressor.</li>
                                      <li><strong>External Hoses and Lines</strong> – except Hydrostatic Drive lines.</li>
                                </ul>
                               <p>Service Items such as:</p>
                               <ul style="margin-left:15px;">
                                    <li>Coolant</li>
                                    <li>Oil</li>
                                    <li>Additives</li>
                               </ul>


                               <div style="font-weight:bold;margin-bottom:0;padding-bottom:0;">Maintenance Items such as:</div>
                               <ul style="margin-left:15px;margin-top:0;padding-top:0;">
                                <li>V-Belts</li>
                                <li>Filters and Elements</li>
                                 <li>Fuses and Wiper Blades</li>
                                  <li>Lamps, Lights and Bulbs</li>
                                   <li>Paint and Decals</li>
                                    <li>Weld maintenance structural repair such as defined in the Operation and Maintenance Manual.</li>
                                     <li>Driveline Wear Items </li>
                               </ul>


                               <div>General Exclusions and Limitations:</div>
                               <ul style="margin-left:15px;">
                                <li>Operator Abuse or Neglect</li>
                                <li>Wear out or normal deterioration</li>
                                <li>Chemical corrosion and physical or mechanical erosion.</li>
                                <li>Accelerated wear out of components due to operating technique or application.</li>
                                <li>Accident damage </li>
                               </ul>
                           </td>
                       </tr>
                      
                       </table> 
                        <?hard-pagebreak?>
                    </td>
                </tr>
                 <tr>
                      <td><center>Terms and Conditions</center>
                            <uc1:EPPSmallPrintOil runat="server" ID="EPPSmallPrintOil1" /> 
                      </td>
                </tr>
                <tr>
                    <td>
                        <uc1:EPPWarning runat="server" ID="EPPWarning1" />
                     </td>
                 </tr>
                </table>                        
                 </ItemTemplate>
            </telerik:GridTemplateColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 02 Dec 2011, 05:47 AM
Hello,

Take a look into Table / Cell borders portion of the following documentation.
PDF export

Thanks,
Princy.


0
Karl
Top achievements
Rank 1
answered on 02 Dec 2011, 10:29 AM
Thank you I have tried this but it doesn't work.The border I want to move isn't on the RadGrid itself  but on a table I've put inside the grid.
0
Accepted
Antonio Stoilkov
Telerik team
answered on 07 Dec 2011, 05:14 AM
Hello Karl,

I have resolved your issue by changing the border definition to inline CSS styles. You could observe the old html code and the new in the next two lines.

<table width="550" border="1"  >
<table style="border-width: 1pt; border-style:solid; border-color: #000000; width:500px;">

Additionally, I would recommend using CSS style definitions for the properties that have style representation.

Best wishes,
Antonio Stoilkov
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
0
Karl
Top achievements
Rank 1
answered on 07 Dec 2011, 10:29 AM
Thank you. I actually wanted a table without a border but  the same principle applies, inline styles works. I actually got around it by using divs to layout the  tables rather than nesting tables which is probably better anyway.

Tags
Grid
Asked by
Karl
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Karl
Top achievements
Rank 1
Antonio Stoilkov
Telerik team
Share this question
or