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

[Solved] changing css MasterTable_WebBlue programatically

2 Answers 130 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Manish
Top achievements
Rank 1
Manish asked on 05 Jun 2009, 02:15 PM
Hi,
I am creating a radgrid programatically. I am using Radcontrols 2007.
i am using the skin WebBlue.
In the css of the skin WebBlue, there is a css class MasterTable_WebBlue, which has the property

border-collapse

: separate !important;
I want to change this to

 

 

border-collapse

: collapse;

But, i want to achieve this programatically.
I have tried  

 

 

m_MainGrid.MasterTableView.Attributes.Add("border-collapse", "collapse"); 

  

 

 

m_MainGrid.Style.Add("border-collapse", "collapse"); 

 

But none of them have actually worked.

Can any moderator help please ?

Manish Thapar

 

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 08 Jun 2009, 08:59 AM
Hi Manish,

Please add the following CSS rule to your web page or any registered stylesheet:

.RadGrid_WebBlue  .MasterTable_WebBlue
{
     border-collapse:collapse !important;
}

If you want to apply the above change to selected RadGrid controls only, then I recommend setting a custom CssClass to the MasterTableView (no matter programmatically or declaratively) and then use:


.RadGrid_WebBlue  .MyCustomMasterTableClass
{
     border-collapse:collapse !important;
}


In order to override a CSS style, which has been defined with the !important clause, you have to use another CSS style with an !important clause and a CSS selector with a higher specificity.

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.
0
Manish
Top achievements
Rank 1
answered on 08 Jun 2009, 11:25 AM
Thank you very much for your help.
It worked fantastically as I wanted !.
Thanks again.
Tags
Grid
Asked by
Manish
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Manish
Top achievements
Rank 1
Share this question
or