This is a migrated thread and some comments may be shown as answers.
Unable to bind TabStrip to DataSource
0 Answers 72 Views
This is a migrated thread and some comments may be shown as answers.
OgOJack
Top achievements
Rank 1
OgOJack asked on 03 Feb 2012, 04:00 PM
Hi all.

I've faced to the problem with TabStrip and DataSource. After binding TabStrip to some simple datasource, it displays nothing, but if I bind these data to the ComboBox - it works great. Here is the code:
<div id="variantTabs"></div>
<div id="comboBox"></div>
 
<script src="http://code.jquery.com/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="kendoUI/js/kendo.all.js" type="text/javascript"></script>
<script type="text/javascript">
    function Variant(_name,_id,_content){
        this.text=_name;
        this.id=_id;
        this.content=_content;
    }
     
    function VariantsViewModel(){
     
        var VariantsList=[
            new Variant("first","1",""),
            new Variant("second","2",""),
            new Variant("third","3","")
        ];
         
        var localDataSource = new kendo.data.DataSource({data: VariantsList});
         
 
         
        $("#variantTabs").kendoTabStrip({
            dataSource:localDataSource
        });
         $("#comboBox").kendoComboBox({
            index: 0,
            dataTextField: "text",
            dataValueField: "id",
            dataSource:localDataSource
         });
         
    }
    $(function(){VariantsViewModel();});
 
     
 
</script>

Any help would be appreciated.
Thanks.

No answers yet. Maybe you can help?

Asked by
OgOJack
Top achievements
Rank 1
Share this question
or