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

RadGrid Skins

11 Answers 209 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Balamurali Venkatesan
Top achievements
Rank 1
Balamurali Venkatesan asked on 12 Mar 2009, 01:54 PM
Hi,

We are actually customizing the Rad skins to our needs.
We are unable to set the Alternating row style color and the edititemstyle color in the Grid.Default.css

These two paarmeters need to be set only the page as a radgrid property.

The only option available in the CSS is the first child edit item color.

Could you please provide some help on this

Thanks
Bala

11 Answers, 1 is accepted

Sort by
0
Thomas Salt
Top achievements
Rank 1
answered on 12 Mar 2009, 02:06 PM
As far as I know the two properites you need to set for this are as follows:

.GridAltRow_DefaultSkin  and .GridEditRow_DefaultSkin

HTH

0
Balamurali Venkatesan
Top achievements
Rank 1
answered on 12 Mar 2009, 02:44 PM
Actually i need to set the row backcolor for alternating rows not the skin ID.
0
Dimo
Telerik team
answered on 12 Mar 2009, 04:47 PM
Hi Bala,

I could not understand whether you want to customize the row appearance declaratively or with CSS.

If you want to customize row appearace declaratively, you should use the AlternatingItemStyle and EditItemStyle properties:

http://www.telerik.com/help/aspnet-ajax/grdcustomizingrowappearance.html

If you want ot use CSS only, then you should use:

(for RadGrid versions prior to Q1 2009)

tr.GridAltRow_SkinName
{
        background: ....... ;
}

tr.GridEditRow_SkinName
{
        background: ....... ;
}


(for RadGrid Q1 2009 and later)

.RadGrid_SkinName  tr.rgAltRow
{
        background: ....... ;
}

.RadGrid_SkinName  tr.rgEditRow
{
        background: ....... ;
}


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
Balamurali Venkatesan
Top achievements
Rank 1
answered on 13 Mar 2009, 09:35 AM
Hi,

I need to customize the row appearance  with CSS only.Thanks for the reply.It worked fine.
Do you have any kind of documentation which would explain in detail the CSS properties.

Thanks and Regards
Bala


0
Dimo
Telerik team
answered on 13 Mar 2009, 09:42 AM
Hello Balamurali,

Yes, we have:

http://www.telerik.com/help/aspnet-ajax/grdcreatingnewskins.html

Kind regards,
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
Balamurali Venkatesan
Top achievements
Rank 1
answered on 13 Mar 2009, 10:43 AM
Hi,

I got another problem while setting up the alternating style color in the CSS

.GridAltRow_Default

td

 

{

 

background: #EDEFF1;

 

}


The row selection is not working for alternate rows.
Only the odd rows are getting selected and when i clik on the even rows its not getting selected

Thanks and Regards
v.Balamurali
0
Dimo
Telerik team
answered on 13 Mar 2009, 12:59 PM
Hi Balamurali,

The selected row styles are set for the <TR> element, while the alternating row styles are set for the <TD> elements inside the <TR>. That's why you are not seeing the selected style background.

All background styles should be set to <TR> elements.

Best wishes,
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
Balamurali Venkatesan
Top achievements
Rank 1
answered on 16 Mar 2009, 09:18 AM
HI,
Could you paste send a sample Css code to set the Grid alternating row style and also all the rows should be highlighted on click.

I added the following code,in this case the rows are getting highlighted but the alternating row style is not working

 

td.GridAltRow_Default

 

{

 

background: #EDEFF1;

 

}




Thanks
Bala
0
Dimo
Telerik team
answered on 16 Mar 2009, 12:12 PM
Hi Balamurali,

Please replace

td.GridAltRow_Default

with

tr.GridAltRow_Default


Regards,
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
Balamurali Venkatesan
Top achievements
Rank 1
answered on 17 Mar 2009, 04:10 PM
Hi,

Thanks for the reply.When I did that.The alternating row is not getting selected.

Thanks
Bala
0
Dimo
Telerik team
answered on 17 Mar 2009, 04:14 PM
Hello Balamurali,

This is expected, because you have supplied a custom CSS rule with a higher specificity, which overrides the skin's rule for selected rows.

You will have to supply a custom CSS rule for selected rows in a similar fashion:

tr.SelectedRow_Default
{
    background: ..... ;
}

This rule should come after the alternating row rule.

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
Balamurali Venkatesan
Top achievements
Rank 1
Answers by
Thomas Salt
Top achievements
Rank 1
Balamurali Venkatesan
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or