Is there a way to control the way selected list view items are rendered? Can it be selected with a radio button instead of being highlighted?
1 Answer, 1 is accepted
answered on 06 Dec 2022, 02:20 PM
There is no specific integration between the ListView and a radio button. The ListView displays a list of items. You have control over what is displayed within the items through using a template. Inside that template you can and have some arbitrary Html, which will be rendered withing the items. This gives you the ability to customize the items and show the desired data in them, display images, format the text, etc.
As for the selection functionality, by default when a specific item is clicked, the "k-selected" class is applied automatically to the element that wraps the item's content. As a result, it appears highlighted.
You can override the styles that are applied to elements that have the "k-selected" class, so that the item doesn't get highlighted on click, but with regard to any modifications of the selection functionality to work with a radio button that's not available out-of-the-box and would require a custom solution to achieve.
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/.