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

Help Changing Row Color onMouseOver Event

2 Answers 88 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brad
Top achievements
Rank 1
Brad asked on 01 Aug 2010, 11:33 PM
I need to be able to roll over a Grid Row and have the row color change without changing the grid lines. I found a solution that changes the color fine but it removes the grid lines, horizontal and vertical, and changes the row height to 20 PX.

 .RowMouseOver td
 {
   background-color: Aqua;
   height: 30px;
 }
function RowMouseOver(sender, eventArgs) {
    $get(eventArgs.get_id()).className = "RowMouseOver";
}

Thanks for any ideas as  I am new here

2 Answers, 1 is accepted

Sort by
0
Pavel
Telerik team
answered on 02 Aug 2010, 03:28 PM
Hi Brad,

You can set EnableRowHoverStyle="true" in the ClientSettings of the Grid and then use the rgHoveredRow CSS class to customize the color and height of the row:
.rgHoveredRow
{
    background-image: none !important;
    background-color: Aqua !important;
    height: 30px !important;   
}

Regards,
Pavel
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Brad
Top achievements
Rank 1
answered on 02 Aug 2010, 07:43 PM
Thanks a lot, worked perfectly. Maybe this was so easy that is why I was unable to find a reference in a thread for it.
Thanks again
Tags
Grid
Asked by
Brad
Top achievements
Rank 1
Answers by
Pavel
Telerik team
Brad
Top achievements
Rank 1
Share this question
or