Last Updated: 22 Apr 2021 18:00 by ADMIN
Created on: 22 Apr 2021 15:46
Category: ListView
Type: Feature Request
Listview Selectable Items
Is it possible this control could be updated to support item selection? This ability seems to be supported on frameworks like jQuery (Selection in jQuery ListView Widget Demo | Kendo UI for jQuery ( I know the functionality can be added after the fact but it would be nice if the control had better support for this since this is a common use case for this type of control. 
1 comment
Marin Bratanov
Posted on: 22 Apr 2021 18:00

Hi Dale,

The jQuery widgets are centered around modifying the DOM directly, which is not what Blazor does. On the contrary, in Blazor you can't really touch the DOM directly.

This carries even more weight for templates - once a template is declared, the parent component that renders it cannot influence it in any way, and so there is no way for the ListView for Blazor to go and add the selected class to your own content in the ItemTemplate, nor can it add attributes like aria-selected.

This key difference between the frameworks is why the Blazor ListView cannot offer an out-of-the-box selection feature and why the app must implement it. You can find an example of doing that in this sample project:

Thus, I must mark this as "Declined" because there isn't a way for the component to do this on its own.

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.