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

Cannot get rid of RadGrid padding when using a GridTemplate Column.

3 Answers 600 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Antonio
Top achievements
Rank 1
Antonio asked on 09 Aug 2011, 01:10 PM
In the markup below you'll notice I've set everything to 0pt padding, yet still I get padding and cannot get a border line to go all the way across (see screenshot.) What do i need to do to remove all padding in RG custom header?

<telerik:GridTemplateColumn UniqueName="colCustomerName">
                    <HeaderStyle BorderWidth="0pt" BorderStyle="Solid" Width="30%" ></HeaderStyle>
                    <HeaderTemplate>
                        <table align="center" cellpadding="0pt" >
                            <tr id="blank" style="padding:0pt 0pt 0pt 0pt">
                                <td style="padding:0pt 0pt 0pt 0pt">
                                      
                                </td>
                            </tr>
                            <tr align="center" style="padding:0pt 0pt 0pt 0pt" >
                                <td style="width:365pt; border-top:solid thin black;background-color:#d3dfd3; padding:0pt 0pt 0pt 0pt">
                                    Customer
                                </td>
                            </tr>
                        </table>
                    </HeaderTemplate>

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 09 Aug 2011, 01:33 PM
Hello Antonio,

Try setting the following CSS:
CSS:
<style type="text/css">
 .RadGrid .rgRow td, .RadGrid .rgAltRow td, .RadGrid .rgEditRow td, .RadGrid .rgFooter td, .RadGrid .rgFilterRow td, .RadGrid  .rgHeader, .RadGrid .rgResizeCol, .RadGrid .rgGroupHeader td
  {
     padding-left:0px !important;
     padding-right: 0px !important;
  }
 </style>

Thanks,
Shinu
0
Antonio
Top achievements
Rank 1
answered on 09 Aug 2011, 01:45 PM
Thanks for your reply! However this does not change things, I still get the same results. Tried applying the different class names across the markup and no change.

Am I missing something?
0
Pavlina
Telerik team
answered on 09 Aug 2011, 04:12 PM
Hi Antonio,

Please read the following blog post:
http://blogs.telerik.com/dimodimov/posts/08-06-17/how_to_override_styles_in_a_radcontrol_for_asp_net_ajax_embedded_skin.aspx


Also I highly recommend you to use web tools like Firebug for Firefox / IE developer tool. Shortcut F12 activates both and with them is very easy to find out what to change in order to override some CSS styles.

Kind regards,
Pavlina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
Antonio
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Antonio
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or