# Capturing Row Hover Event оf Grid Row and Getting Data Item

## Environment

<table>
<tbody>
<tr>
<td>Product</td>
<td>Grid for ASP.NET ASP.NET MVC</td>
</tr>
<tr>
<td>Version</td>
<td>2024.2.514</td>
</tr>
</tbody>
</table>

## Description

How to capture the hover event of a row in the Grid and access the corresponding data item object?

## Solution

To achieve row hover functionality and retrieve column object values, follow these steps:

1. Subscribe to the [`DataBound`](https://www.telerik.com/aspnet-mvc/documentation/api/kendo.mvc.ui.fluent/grideventbuilder#databoundsystemstring) event of the Grid.
2. Within the event handler, bind the jQuery [`mouseenter`](https://api.jquery.com/mouseenter/) event to the table rows.
3. Use the [`dataItem()`](https://docs.telerik.com/kendo-ui/api/ui/grid/methods/dataitem) client-side method of the Grid to get the data item associated with the hovered row.

```Razor HtmlHelper
    .Events(e => e.DataBound("onDataBound"))
```

```JavaScript
    
    // Define the DataBound event handler:
    function onDataBound() {
        var grid = this; // Reference to the Grid instance.
    
        // Bind "mouseenter" event to table rows.
        $(".k-master-row").on("mouseenter", function() {
            var currentRow = this; // Access the hovered row element.
            var dataItem = grid.dataItem(currentRow); // Get the data item of the row.
    
            // Log the data item object in the browser console or perform the desired action.
            console.log(dataItem);
        });
    }
```

### REPL Example

You can test this example using the following REPL sample: [Row Hover Event Example](https://netcorerepl.telerik.com/wzOTmxOf4452tsp840).

## More ASP.NET MVC Grid Resources

* [ASP.NET MVC Grid Documentation](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/data-management/grid/overview)

* [ASP.NET MVC Grid Demos](https://demos.telerik.com/aspnet-mvc/grid/index)

* [ASP.NET MVC Grid Product Page](https://www.telerik.com/aspnet-mvc/grid)

* [Telerik UI for ASP.NET MVC Video Onboarding Course (Free for trial users and license holders)](https://www.telerik.com/aspnet-mvc/documentation/getting-started/video-onboarding)

* [Telerik UI for ASP.NET MVC Forums](https://www.telerik.com/forums/aspnet-mvc)

## See Also

* [Client-Side API Reference of the Grid for ASP.NET MVC](https://docs.telerik.com/kendo-ui/api/ui/grid)

* [Server-Side API Reference of the Grid for ASP.NET MVC](https://www.telerik.com/aspnet-mvc/documentation/api/grid)

* [Telerik UI for ASP.NET MVC Knowledge Base](https://docs.telerik.com/aspnet-mvc/knowledge-base)
