Probelm with MVVM TabStrip in Window

2 posts, 0 answers
  1. RES
    RES avatar
    77 posts
    Member since:
    Sep 2010

    Posted 07 Oct 2014 Link to this post

    I'm trying to render out a TabStrip widget in a Window widget via MVVM but I am not able to get it to work.

    Here is my template:
    <script id="myTemplate" type="text/x-kendo-template">
        <div data-role="tabstrap">
            <ul>
                <li class="k-state-active">Tab 1</li>
                <li>Tab 2</li>
                <li>Tab 3</li>
            </ul>
     
            <div>
                <p>tab 1</p>
            </div>
     
            <div>
                <p>tab 2</p>
            </div>
     
            <div>
                <p>tab 3</p>
            </div>
        </div>
    </script>

    Here is my code:
    var viewModel = kendo.observable({});
    var template = kendo.template($("#myTemplate").html().trim(), { useWithBlock: false });
    var $dialog = $(template());
     
    kendo.bind($dialog, viewModel);
     
    $dialog.kendoWindow({
        title: "My Dialog",
        width: 600,
        height: 300
    });
     
    $dialog.data("kendoWindow").open();

    The dialog opens fine however the TabStrip widget is not rendered.  Here's a link to an example of the issue.
    http://example.rengr.co/home/tabstripWindow

    I tried modifying one of the demos to do the same and for some strange reason it works fine, although for some reason it opens another additional empty window underneath.  Here's a link to that example.
    http://dojo.telerik.com/eFAL

  2. RES
    RES avatar
    77 posts
    Member since:
    Sep 2010

    Posted 07 Oct 2014 Link to this post

    Ahh nevermind, typo!
  3. Kendo UI is VS 2017 Ready
Back to Top