Declined
Last Updated: 22 Apr 2021 18:00 by ADMIN
Dale
Created on: 22 Apr 2021 15:46
Category: ListView
Type: Feature Request
0
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 (telerik.com)) 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
ADMIN
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: https://github.com/telerik/blazor-ui/tree/master/listview/item-selection

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

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.