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

row hover

5 Answers 262 Views
Grid
This is a migrated thread and some comments may be shown as answers.
kmv
Top achievements
Rank 1
kmv asked on 11 Jun 2009, 12:22 PM
whats the easiest way to add row hover effects (sunset skin) to a radgrid




thanks
kevin

5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 11 Jun 2009, 01:05 PM
Hello Kevin,

You can try out the following code to styles on hovering over a row:
c#:
protected void RadGrid_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) 
    { 
       if (e.Item is GridDataItem) 
        { 
            GridDataItem dataItem = (GridDataItem)e.Item; 
            dataItem.Attributes.Add("onmouseover""this.style.backgroundColor = 'green';"); 
            dataItem.Attributes.Add("onmouseout""this.style.backgroundColor = '';");             
        } 
     } 
 

Thanks
Princy.
0
Daniel
Telerik team
answered on 11 Jun 2009, 01:19 PM
Hello Kevin,

The easiest way is to use the built-in hover effect:
    .... 
    <ClientSettings EnableRowHoverStyle="true" /> 
</telerik:RadGrid> 

Best regards,
Daniel
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
kmv
Top achievements
Rank 1
answered on 11 Jun 2009, 01:23 PM
ahh i suspected it must be in there somewhere



thanks
0
Shinu
Top achievements
Rank 2
answered on 12 Jun 2009, 04:22 AM
Hi kmv,

You can also refer the following help article which explains how to set style on mouse hovering.
Set style on mouse over

Shinu.
0
Jan
Top achievements
Rank 1
answered on 13 Feb 2010, 09:49 AM
That was exactly what I was looking for, thanks, for such a great community!
Tags
Grid
Asked by
kmv
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Daniel
Telerik team
kmv
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Jan
Top achievements
Rank 1
Share this question
or