4 Answers, 1 is accepted
Hello Ronald,
The ListView, unlike the grid, does not control the rendering of its items, so it can't offer such an event to you. You can, however, hook your own events, like @onclick and get the item with a simple lambda.
You can find a very similar example in this project: https://github.com/telerik/blazor-ui/tree/master/listview/item-selection
Regards,
Marin Bratanov
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
![](/forums/images/avatarimages/default.gif)
![](/forums/images/avatarimages/default.gif)
Hello Ronald,
You can pass whatever object you choose to. I chose to pass an ID in the example for selection I made, you can pass the whole model, just touch up the corresponding method signature to accept that.
The basics would look something like:
<TelerikListView Data="@ListViewData" Width="700px" Pageable="true">
<HeaderTemplate>
<h2>Employee List</h2>
</HeaderTemplate>
<Template>
<div class="listview-item @( context.Selected ? "selected-item" : "" )" @onclick="@( _ => Console.WriteLine(context) )">
<h4>@context.Date.ToShortDateString()</h4>
<h5>@context.TemperatureC °C</h5>
<h6>@context.Summary</h6>
</div>
</Template>
</TelerikListView>
Regards,
Marin Bratanov
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.