This is a migrated thread and some comments may be shown as answers.

Select Items on map with MVVM framework

2 Answers 73 Views
Map
This is a migrated thread and some comments may be shown as answers.
n/a
Top achievements
Rank 1
n/a asked on 08 Oct 2019, 09:48 PM
I have looked over the examples for selecting items from the Visualization layer, specifically "Visualization Layer Items Selection" but they all seem to require adding event handlers in the code behind. Is there a way to select items without having to add an event handler in the code behind and keep all the logic in the viewmodel? Normally I just use data binding with the ItemsSelected property but that doesn't seem to be working.

2 Answers, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 11 Oct 2019, 12:30 PM

Hello Robert Haydock,

You can consider using our EventToCommandBehavior behavior. It allows you to bind an event to a command from your ViewModel. This way you can create your logic in the ViewModel. I have modified the VisualizationLayerItemsSelection SDK demo from our GitHub repository to demonstrate how you can achieve this.

I hope this approach will work for you.

Regards,
Dinko
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
n/a
Top achievements
Rank 1
answered on 11 Oct 2019, 07:52 PM
Thanks Dinko! I think that should work perfectly.
Tags
Map
Asked by
n/a
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
n/a
Top achievements
Rank 1
Share this question
or