3 Answers, 1 is accepted
Hi Peter,
You can override the ItemTap Command and execute the default logic ( which is selecting the item) according to the item's properties. Here is an example of creating a custom ListView command: Using the ListViewCommand class.
Inside the Execute method you can access the tapped item and call this.Owner.CommandService.ExecuteDefaultCommand(this.Id, parameter); based on its properties.
In addition, you can style the items differently through the ItemStyleSelector property to mark them as non-selectable.
I hope I was of help.
Regards,
Yana
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/.
Hi Peter,
I am sorry, I didn't explain it clearly, what I meant is through ItemStyleSelector you can make the items visually look unselectable. Other than that, the only way to actually prevent selection is through the ListView ItemTap command.
I've attached a small example to show you exactly what I mean. Please download the attachment and give it a try.
Let me know if I can assist you with anything else.
Regards,
Yana
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/.