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

Events for Switch widget

1 Answer 45 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
Running
Top achievements
Rank 1
Running asked on 27 Jun 2018, 10:52 PM

Hello,

Can someone supply a current, up to date documentation for the Switch widget?

In my own research, I am finding very little info on how to use the Switch widget with MVVM. What little info I find is contradictory or incomplete, like this https://www.telerik.com/forums/kendo-mobile-switch-not-updating-viewmodel

 

Then I found this resource, which is definitely incomplete. It is also false, because I can't get any events to fire.

https://demos.telerik.com/kendo-ui/m/switch/mvvm.

 

I am in the process of converting the checkboxes of my app to switches, as per client. I am using traditional inputs, klendo dropdowns, kendo autocomplete, etc. Everything is initialized via mvvm. But for some reason, the switch widget is not working, as none of my events are binding. I must be able to listen to a change or click event, but no luck. How do i bind to the change event on a switch widget?

 

Also, could you include the CSS of the switch widget with the rest of the kendo widgets? If the switch widget is in the kendo javascript file by default, shouldn't the default css files also include the switch widget?

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 29 Jun 2018, 10:42 AM
Hi,

I have created a simple dojo with switch hand MVVM scenario. The most important step is to add the kendo.mobile.ui when using kendo.bind as it is described at the end of this paragraph.

As for the styles you can refer to this help topic where this topic is explained deeper.

Regards,
Plamen
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
MVVM
Asked by
Running
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or