Custom Widget - MVVM Widgets in Templates not properly rendered

2 posts, 0 answers
  1. Patrick
    Patrick avatar
    9 posts
    Member since:
    Jun 2014

    Posted 16 Dec 2014 Link to this post


    I'm developing a custom widget, based on the Blog entry "Creating A Kendo UI MVVM Widget". The template contains a Kendo Dropdownlist. The Dropdown Widget is not properly rendered, only the input field is displayed. What am I doing wrong? Is anything missing there?

    The container is defined as:
    <div id="customWizardTest" data-role="wizard" data-title="TestConfigWizard" data-width="600" data-visible="false" data-template="template"/>

    And my temlplate is defined that way:
    <script type="text/x-kendo-template" id="template">
               <input id="wizTranscoderList" data-role="dropdownlist"/>

    In the "refresh" method of the custom widget the (re)-rendering of the template is done:
    refresh: function() {
            var that = this,
                view = that.dataSource.view();
            if(view.length > 0)
                that.template = kendo.template(that.options.template);
                var  html = kendo.render(that.template, view);
    The view has content, so the rendering will be executed.

    Thanks in advance,
  2. Petyo
    Petyo avatar
    2437 posts

    Posted 17 Dec 2014 Link to this post

    Hello Patrick,

    you will need to call the respective methods (kendo.bind or kendo.init) after the html has been inserted. 

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top