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

Custom widget in TypeScript, missing definition for binders class

1 Answer 103 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Pieter
Top achievements
Rank 1
Pieter asked on 04 Jan 2017, 02:25 PM

Hi,

I'm trying to build a custom widget in TypeScript based on the multiselect. However I found out that mvvm databinding is only working properly if I do something like:

kendo.data.binders.widget.multiselectcustom = kendo.data.binders.widget.multiselect;

 

(example can be found here: http://stackoverflow.com/questions/19710032/extending-multiselect-widget-breaks-value-binding-in-mvvm).

My widget works if I do the entire widget in Javascript, but not in TypeScript, since "kendo.data.binders" is not defined in the d.ts file (and thus the complilation fails).

How can I get this to work?


1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 06 Jan 2017, 11:48 AM
Hello Pieter,

Unfortunately, this is not part of the TypeScript definitions and for now, we do not plan to add it as it is a custom approach.

I can suggest using the custom binder to implement the same logic that we have for the MultiSelect binder.

I can suggest using our approach as an example:

https://github.com/telerik/kendo-ui-core/blob/master/src/kendo.binder.js#L1277

http://docs.telerik.com/kendo-ui/framework/mvvm/bindings/custom

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