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

Hovering over a row in a radgridview

4 Answers 151 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Yonatan
Top achievements
Rank 1
Yonatan asked on 27 Aug 2012, 08:22 AM
Hello,

I'm trying to get a message containing the row info every time the mouse hovers over the row in the radgridview. The message content doesn't disturb me at this point, my problem is that I can't find  a mousehover() event or something of this sort. Can you help me?

4 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 27 Aug 2012, 10:36 AM
Hello,

 You can set a Tooltip. Please check this help article that shows how to add ToolTip to rows. 

Kind regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Yonatan
Top achievements
Rank 1
answered on 27 Aug 2012, 11:42 AM
Hi Didie,

Thanks for the reply. The tooltip is not good for me, as I want something completely different:

I have a map along the gridview (every row in the gridview represents a different part of the map),
, and I want the map part that is represented by the row the mouse is hovering on to glow until the mouse moves away from the row.

For that I need a mousehover() event or mouserowhover() event or  something like that. Does the RadGridViw have something like that?
 
0
Accepted
Dimitrina
Telerik team
answered on 28 Aug 2012, 08:01 AM
Hi,

 You can subscribe for the MouseEnter and MouseLeave events of the GridViewRow and use them:

void playersGrid_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
{
    var row = e.Row as GridViewRow;
    
    if (row != null)
    {
        row.MouseEnter += new System.Windows.Input.MouseEventHandler(row_MouseEnter);
        row.MouseLeave += new System.Windows.Input.MouseEventHandler(row_MouseLeave);
    }
}

void playersGrid_RowUnloaded(object sender, Telerik.Windows.Controls.GridView.RowUnloadedEventArgs e)
{
    var row = e.Row as GridViewRow;
    
    if (row != null)
    {
        row.MouseEnter -= newSystem.Windows.Input.MouseEventHandler(row_MouseEnter);
        row.MouseLeave -= newSystem.Windows.Input.MouseEventHandler(row_MouseLeave);
    }
}

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Yonatan
Top achievements
Rank 1
answered on 04 Sep 2012, 07:42 AM
Thanks a million - it was just the thing I was looking for.
Tags
GridView
Asked by
Yonatan
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Yonatan
Top achievements
Rank 1
Share this question
or