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

Probelm with MVVM TabStrip in Window

1 Answer 73 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
RES
Top achievements
Rank 1
RES asked on 07 Oct 2014, 08:21 PM
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

1 Answer, 1 is accepted

Sort by
0
RES
Top achievements
Rank 1
answered on 08 Oct 2014, 04:57 AM
Ahh nevermind, typo!
Tags
TabStrip
Asked by
RES
Top achievements
Rank 1
Answers by
RES
Top achievements
Rank 1
Share this question
or