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

Grid Lines

5 Answers 180 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Azees
Top achievements
Rank 1
Azees asked on 14 Oct 2008, 10:37 AM
I am using Rad grid ..I need to show grid without Lines

I set GridLines="None"

but there is no change...The lines are always show

How to i remove it

I am using

Skin

="Office2007"

 

in my rad grid

5 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 14 Oct 2008, 01:09 PM
Hello Azees,

GridLines and CSS borders are different things. RadGrid skins use the border CSS property, while the GridLines property uses the rules HTML attribute. You cannot remove CSS borders with the GridLines property.

Please add the following CSS rules to your web page (web site) in order to remove the borders from the header and data cells:

th.GridHeader_Office2007,
th.ResizeHeader_Office2007,
tr.GridRow_Office2007 td,
tr.GridAltRow_Office2007 td,
tr.GridFooter_Office2007 td,
tr.GridGroupFooter_Office2007 td
{
     border: 0;
}

th.GridHeader_Office2007,
th.ResizeHeader_Office2007
{
    border-bottom:1px solid #9EB6CE;
}


The second rule will preserve the bottom borders for the header cells.



Best wishes,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Bill Siegler
Top achievements
Rank 1
answered on 17 Mar 2009, 02:52 PM
This solution was working for the last 2008 release. I just updated to the Q1 2009 controls and this doesn't work anymore. Any thoughts?
0
Dimo
Telerik team
answered on 17 Mar 2009, 03:18 PM
Hello Bill,

The CSS rules for RadGird Q1 2009 should be:


div.RadGrid_Office2007  .rgHeader, 
div.RadGrid_Office2007  th.rgResizeCol, 
div.RadGrid_Office2007  .rgRow  td, 
div.RadGrid_Office2007  .rgAltRow  td, 
div.RadGrid_Office2007  .rgFooter  td 
     border: 0; 
 
div.RadGrid_Office2007  .rgHeader, 
div.RadGrid_Office2007  th.rgResizeCol 
    border-bottom:1px solid #9EB6CE



Sincerely yours,
Dimo
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Bill Siegler
Top achievements
Rank 1
answered on 17 Mar 2009, 04:22 PM
Thanks this worked fine. One more question: if you have a page with 2 grids and you want one to have grid lines and the other to not have them, how can you apply the styles to a single grid?
0
Dimo
Telerik team
answered on 17 Mar 2009, 05:02 PM
Hi Bill,

You can set a custom CssClass to all RadGrids, which you want to NOT have borders and replace all occurrences of "RadGrid_Office2007" with the custom CSS class in the rules above. For example:

<telerik:RadGrid  CssClass="MyCustomClass" />

div.MyCustomClass  .rgHeader,
div.MyCustomClass  th.rgResizeCol,
div.MyCustomClass  .rgRow  td,
div.MyCustomClass  .rgAltRow  td,
div.MyCustomClass  .rgFooter  td
{
     border: 0;
}
 
div.MyCustomClass  .rgHeader,
div.MyCustomClass  th.rgResizeCol
{
    border-bottom:1px solid #9EB6CE;
}


Greetings,
Dimo
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Azees
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Bill Siegler
Top achievements
Rank 1
Share this question
or