or
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head> <link href="kendo.common.min.css" rel="stylesheet" /> <link href="kendo.default.min.css" rel="stylesheet" /> <script src="jquery.min.js"></script> <script src="kendo.all.min.js"></script> <script> $(function () { var data = [{ Name: 'Tab 1', Url: '#content1' }, { Name: 'Tab 2', Url: '#content2' }]; $("#tabstrip").kendoTabStrip({ dataTextField: "Name", dataUrlField: "Url", dataSource: data, select: function (el) { //would be nice to have a reference to the data source data item here rather than relying on the item index. var itemIndex = $(el.item).index(); $('.tabContent').hide(); $('#content' + itemIndex).show(); } }); getSelectedTabIndex = function () { return $("#tabstrip").data("kendoTabStrip").select().index(); } $('#showSelectedTabIndex').click(function () { //always returns -1 alert(getSelectedTabIndex()); }); }); </script></head><body> 1.) Click a tab <br /> 2.) Click the Show Selected Tab Index button.<br /> <br /> The tab is not visually selected and the value returned for the selected index is -1. <br /><br /> <button id="showSelectedTabIndex">Show Selected Tab Index</button> <div id="tabstrip"></div> <div id="content0" class="tabContent" style="display:none;">Content 1</div> <div id="content1" class="tabContent" style="display:none;">Content 2</div> </body></html>
EntityResource.query(function (entities) { //Entities are loaded dynamically when project selected.
//form data and append to tree
treeview.append(..., projectNode);}EntityResource.query(function (entities) { var localDataSource = new kendo.data.HierarchicalDataSource({ data: entities});
localDataSource .fetch();
treeview.append(localDataSource ,projectNode);} var hierarchialEntities = [ { EntityName: "Parent1", items: [ { EntityName: "Entity1", class: '.entity-node', isEntity: true }, { EntityName: "Entity2", class: '.entity-node', isEntity: true }, { EntityName: "Entity3", class: '.entity-node', isEntity: true, items: [{ EntityName: "Entity7", class: '.entity-node', isEntity: true }] } ] }, { EntityName: "Parent2", items: [ { EntityName: "Entity4", class: '.entity-node', isEntity: true}, { EntityName: "Entity5", class: '.entity-node', isEntity: true}, { EntityName: "Entity6", class: '.entity-node', isEntity: true } ] }]; treeview.append(hierarchialEntities,projectNode); //works as expected!!!
$("#gridCityCodes").css("top", "46px").kendoGrid({ dataSource: this.gridDataSource, sortable: true, editable: true, selectable: "multiple", navigatable: true, filterable: true, resizable: true, columnMenu: true, change: this.gridChanged, toolbar: [{ name: "save", text: userMsgs.Save }, { name: "cancel", text: userMsgs.Cancel}], columns: [{ field: "CityAlpha", width: "100px", title: userMsgs.CityCode, filterable: this.fixGridFilterPopups }, { field: "CityNumeric", width: "150px", title: userMsgs.IataCityCode, filterable: this.fixGridFilterPopups }, { field: "Description", width: "300px", title: userMsgs.Description, filterable: this.fixGridFilterPopups }, { field: "NextFlightEnabled", width: "200px", title: userMsgs.NextFlightEnabled, filterable: this.fixGridFilterPopups}], dataBound: function () { window.selectedModuleViewModel.reHighlightSelectedRows(); window.selectedModuleViewModel.pullColumnsForFiltering(); } }); fixGridFilterPopups: { ui: function (element) {/* logic commented out to do nothing right now. */ } }var ObservableObject = Observable.extend({ init: function(value) { var that = this, member, field, parent = function() { return that; }; Observable.fn.init.call(this); for (field in value) { member = value[field]; if (field.charAt(0) != "_") { member = that.wrap(member, field, parent); // <-------- error occurs here } that[field] = member; } that.uid = kendo.guid(); },