kendo-treeview

Treeview select event is not firing in kendo ui

倾然丶 夕夏残阳落幕 提交于 2021-02-10 22:39:14
问题 I have a treeview defined like $("#treeview").kendoTreeView({ dataSource:homogenous, dataBound: function(e){ $("#treeview").data("kendoTreeView").select(".k-item:first"); }, select: function(){ alert('selectd'); } }); Initially the treeview is selecting. But it is not getting the alert of select . But when we selecting the node it is getting the alert. How should i get rid of them. 回答1: The select method won't fire the select event. You can however use the trigger method to fire any event:

iterate through all dataItems (all kendo ui treeview nodes)

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-07 02:42:26
问题 I am trying to simply loop through all my nodes in a kendo ui treeview. Current GetNodes() is returning not a function.. how can I access that list? I have also tried .get_allNodes(); - tree is accurate, just don't where to iterate trough current nodes. let tv = $("#tree").data("kendoTreeView"); let nodes = tv.GetNodes(); console.log(nodes); for (var i = 0; i < nodes.length; i++) { if (nodes[i].get_nodes() != null) { console.log(nodes[i]); let item = tv.dataItem(nodes[i]); console.log(item);

iterate through all dataItems (all kendo ui treeview nodes)

心不动则不痛 提交于 2021-01-07 02:42:08
问题 I am trying to simply loop through all my nodes in a kendo ui treeview. Current GetNodes() is returning not a function.. how can I access that list? I have also tried .get_allNodes(); - tree is accurate, just don't where to iterate trough current nodes. let tv = $("#tree").data("kendoTreeView"); let nodes = tv.GetNodes(); console.log(nodes); for (var i = 0; i < nodes.length; i++) { if (nodes[i].get_nodes() != null) { console.log(nodes[i]); let item = tv.dataItem(nodes[i]); console.log(item);

How do i check if the node is expanded in Kendo treeView

泪湿孤枕 提交于 2020-01-15 11:31:09
问题 I have a Kendo treeView. I want to collapse the node on single click (the default is on double click). To do that I need to know if the node is expanded already so I can call collapse(e.node). So, how do I check if the node has been expanded already? Thanks a lot 回答1: You can test with $(e.node).attr("data-expanded") === "true" or kendoTreeView._expanded(e.node) , however if your goal is to collapse/expand depending on the current state, you can simply call kendoTreeView.toggle(e.node); 来源:

Angular $location.path not working as expected

假如想象 提交于 2019-12-25 16:02:54
问题 I am triggering a URL change using $location.path with parameters, however those parameters are NOT getting passed to the target page. My source page is sidebar.html, and my target page is dashboard.html. In my sidebar.html I render a Kendo UI treeview widget as follows : <span id="treeview" kendo-tree-view="tree" style="color:white;" k-template="vm.treeItemTemplate" k-options="vm.treeOptions" k-data-source="vm.reportsTree" k-on-change="vm.onTreeSelect(kendoEvent)"> </span> and in my sidebar

Angular $location.path not working as expected

时光怂恿深爱的人放手 提交于 2019-12-25 16:02:00
问题 I am triggering a URL change using $location.path with parameters, however those parameters are NOT getting passed to the target page. My source page is sidebar.html, and my target page is dashboard.html. In my sidebar.html I render a Kendo UI treeview widget as follows : <span id="treeview" kendo-tree-view="tree" style="color:white;" k-template="vm.treeItemTemplate" k-options="vm.treeOptions" k-data-source="vm.reportsTree" k-on-change="vm.onTreeSelect(kendoEvent)"> </span> and in my sidebar

filterable is not working for grid if i am apply if else condition in grid

与世无争的帅哥 提交于 2019-12-25 01:14:46
问题 if we apply if else condition in Kendo grid column then filterable not working for that particular column { field: " ", title: "Compliance Status", width: "180px", template: "# if(WithinDueDt == 'Y'){# Completed on time #} else if(Ongoing == 'Y'){# Ongoing #} else if(CompletedbutDelayed == 'Y'){# Completed but Delayed #} else if(OngoingbutDelayed == 'Y'){# Ongoing but Delayed #} #" } 回答1: Kendo Grid sorting and filtering functionality works based on the field value not based on the template

Nested DataSources and TreeView with kendo ui

北城以北 提交于 2019-12-23 01:58:27
问题 I am having trouble with the Hierarchical Data Source in conjunction with the TreeView and nesting. The goal is to show a treeview with root items like "employees", "profiles" and sub items being the acutal items. So every root item is using a different data source. This is not working, as the root nodes are not expanding while the data source seems to load perfectly. Here's the code: $(document).ready(function() { var userProfileDataSource = new kendo.data.HierarchicalDataSource( { transport

Lazy load in Kendo UI treeview with caching

情到浓时终转凉″ 提交于 2019-12-21 12:14:02
问题 I am using Kendo UI TreeView to load hierarchical data in my webpage. By default, I am loading data upto 3 levels (ie Root -> Root directs -> Root directs' directs). I need a way to lazily load the remaining nodes as user expands further down the tree. Also, the already fetched data must be cached locally to avoid unnecessary calls for already expanded nodes. I am new to Kendo UI and do not have enough time to go through documentation. The json looks like { Id: '1', ParentId: '-1', Payload: {

How to load child node on expand kendo treeview

折月煮酒 提交于 2019-12-13 04:59:17
问题 I want to create a treeview with nodes from folders and files on my PC. User can drag and drop nodes . My design view (cshtml) : @( Html.Kendo().TreeView() .Name("treeview") .Events(ev=>ev.Expand("onExpand")) .BindTo((IEnumerable<TreeViewItemModel>)ViewBag.ParentNode) ) My Controller : public class HomeController : Controller { public ActionResult TreeView() { ViewBag.ParentNode = GetDefaultNode(); return View(); } private IEnumerable<TreeViewItemModel> GetDefaultNode() { List