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

[Solved] Grid MouseOver

1 Answer 153 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.
Eyal
Top achievements
Rank 1
Eyal asked on 15 Sep 2010, 09:30 PM
Hello
I'm trying to catch a MouseOver Event for while the mouse hoover the rows of the grid.
Do you know how it can be implemented in RadGridView as well, once catched how to I get the row number of the hoovered mouse.

Thanks,
Eyal

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 16 Sep 2010, 01:40 PM
Hello Eyal,

You can handle the MouseEnter and MouseLeave events on a cell and implement the logic you need. For further reference and a sample project, you may take a look at this forum thread. The project provided is for WPF but the same method is applicable in Silverlight too. 
As for getting the index of the row, you may use the ItemContainerGenetor. For example:

void cell_MouseEnter(object sender, MouseEventArgs e)
{
    GridViewCell cell = sender as GridViewCell;
    if (cell != null)
    {
         var index = this.playersGrid.ItemContainerGenerator.IndexFromContainer(cell.ParentRow);           
    }
}
 

All the best,
Maya
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
Tags
GridView
Asked by
Eyal
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or