[HTML] <div tapindex="0" id="ReportingPeriodTypeTreeViewData" ej-treeview e-template1="#treeTemplate" class="dropdown-tree-view" e-fields-datasource="dataList" e-fields-id="id" e-fields-parentid="pid" e-fields-text="name" e-fields-expanded="expanded" e-nodeselect="handleReportingPeriodTypeSelection" e-nodeclick="handleAlreadySelectedReportingPeriodType" e-keypress="ensurevisible" e-selectedindex="10" e-width="250px" e-height="250px" e-ready="onready"> </div> [Script] angular.module('treeCtrl', ['ejangular']) .controller('treeviewCtrl', function ($scope) { $scope.dataList = localData; $scope.onready = function (args) { //focus the selected node at initial time ejTreeViewEnsureNodeVisible(this, "12", 400); } $scope.ensurevisible = function (args) { ejTreeViewEnsureNodeVisible(this, args.id, 350); } }); |