New to Telerik UI for ASP.NET MVCStart a free 30-day trial

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

Environment

ProductGrid for ASP.NET ASP.NET MVC
Version2024.2.514

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 event of the Grid.
  2. Within the event handler, bind the jQuery mouseenter event to the table rows.
  3. Use the dataItem() client-side method of the Grid to get the data item associated with the hovered row.
Razor
    .Events(e => e.DataBound("onDataBound"))

REPL Example

You can test this example using the following REPL sample: Row Hover Event Example.

More ASP.NET MVC Grid Resources

See Also