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

AlternatingItemStyle with SelectedItemStyle

3 Answers 47 Views
Grid
This is a migrated thread and some comments may be shown as answers.
IT Purchases
Top achievements
Rank 1
IT Purchases asked on 03 Jul 2008, 02:46 PM
I've defined an alternating item style as well as a selected item style.  They both work fine, except that if I select an item (either a normal style one or an alternating style one) and then de-select it, the background color returns to white rather than the color i've defined in my style tags. How can I fix this?

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 03 Jul 2008, 03:13 PM
Hello,

You can use css classes instead. Here is an example:

.MySelectedStyle td
{
    bacground-color: red;
}

.MyRowStyle td
{
    bacground-color: green;
}

.MyAltRowStyle td
{
    bacground-color: blue;
}

<SelectedItemStyle CssClass="MySelectedStyle" />
<ItemStyle CssClass="MyRowStyle" />
<AlternatingItemStyle CssClass="MyAltRowStyle" />

Greetings,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Shinu
Top achievements
Rank 1
answered on 05 Jul 2008, 06:12 AM
Hi IT Purchases,

You can also have a look at the following help article on customizing the row appearence in RadGrid.
Customizing row appearance

Shinu.
0
IT Purchases
Top achievements
Rank 1
answered on 07 Jul 2008, 02:00 PM
I used a CSS class for the SelectedItemStyle and defined backcolor style for item/alternating item in their respective tags, which solved my problem.
Tags
Grid
Asked by
IT Purchases
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Shinu
Top achievements
Rank 1
IT Purchases
Top achievements
Rank 1
Share this question
or