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

Radgrid row color change on GridClientSelectColumn selected

4 Answers 456 Views
Grid
This is a migrated thread and some comments may be shown as answers.
charles
Top achievements
Rank 1
charles asked on 26 Sep 2011, 03:27 PM
I am using a radgrid with GridClientSelectColumn as one of the column.
i changed the item row color using

e.Item.BackColor ="Red" in itemdatabound event based on some condition


I selected that checkbox which row is already highlighted by this RED color ,  its overwriting my red color background.

I want to prevent this

i tried this .rgSelectedRow
        {
            background-color:Red;
            color: Red !important;
        } also
its making the font color for the row as RED but bg color is not still changing

shall i use

ClientEvents-OnRowSelecting events?

4 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 26 Sep 2011, 04:57 PM
Hello Charles,

Go through the link below and let me know if it helps:
http://www.telerik.com/community/code-library/aspnet-ajax/grid/how-to-preserve-the-original-radgrid-selected-hover-row-background-when-using-itemstyle-backcolor.aspx

Regards,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
charles
Top achievements
Rank 1
answered on 05 Oct 2011, 03:11 PM
Hi,
Thanks for your reply,

I tried with that but its not working.
Following link says, we cant achieve this
http://www.telerik.com/community/forums/aspnet-ajax/grid/gridclientselectcolumn-and-highlighting-issue.aspx


Is it so?
Thanks,
Charles
0
charles
Top achievements
Rank 1
answered on 05 Oct 2011, 03:20 PM
Attached the screenshot like this its working.
I gave like this

 

background-color:Red !important;

 

background-image:none;



but still is not working.


0
Pavlina
Telerik team
answered on 10 Oct 2011, 12:09 PM
Hi Charles,

In order to override a RadGrid (embedded) skin, you have to use a CSS rule with a higher specificity. For more information, please refer to:

http://blogs.telerik.com/dimodimov/posts/08-06-17/how_to_override_styles_in_a_radcontrol_for_asp_net_ajax_embedded_skin.aspx

However, you can try the following CSS code and see if it works as expected:
<style type="text/css">
        div.RadGrid_[SkinName] .rgSelectedRow
        {
            background-color: Red;
            background-image: none;
        }
    </style>
 
Regards,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Grid
Asked by
charles
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
charles
Top achievements
Rank 1
Share this question
or