New to Telerik UI for ASP.NET Core? Start a free 30-day trial
Events
The Telerik UI ListView for ASP.NET Core exposes a number of JavaScript events that allow you to control the behavior of the UI component.
For a complete example of how to handle all ListView events triggered by user interaction, refer to the demo on using the events of the ListView .
Subscribing to Events
The following example demonstrates how to subscribe to the DataBound
event.
Razor
@(Html.Kendo().ListView<Kendo.Mvc.Examples.Models.ProductViewModel>()
.Name("listView")
.TagName("ul")
.ClientTemplateId("template")
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("Products_Read", "ListView"))
.PageSize(21)
)
.Pageable(pageable => pageable
.Refresh(true)
.ButtonCount(5)
.PageSizes(new[] { 5, 15, 21 })
)
.Events(e=>e.DataBound("onDataBound"))
)