Custom widget in TypeScript, missing definition for binders class

2 posts, 0 answers
  1. Pieter
    Pieter avatar
    17 posts
    Member since:
    Oct 2014

    Posted 04 Jan Link to this post

    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?


  2. Stefan
    Admin
    Stefan avatar
    1025 posts

    Posted 06 Jan Link to this post

    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 visualization (charts) and form elements.
Back to Top