Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

kendo treeview get selected node data

// First to which ever element you specified your treeview with its datasource
// Create a new variable of it:

var tv = $('.mytree').data('kendoTreeView');

// You can get the node that you select by calling select() on your treeview
var selected = tv.select();

// Then use your selected as a parameter in the dataItem() function.
var item = tv.dataItem(selected);

// Then you can see what kind of data is inside it by e.g.
console.log(item); // and opening the inspector and expanding your item object

// Or
alert(JSON.stringify(item));

// The object you specified in the data source will be shown with other useful variables.

// To see how to use the data source with json check http://jsfiddle.net/NZq4A/2/
Comment

PREVIOUS NEXT
Code Example
Javascript :: js copy array into another 
Javascript :: how to handle fetch errors 
Javascript :: how to get key from value in javascript 
Javascript :: mongoose put request 
Javascript :: png to base64 javascript 
Javascript :: react chart js 
Javascript :: add checkbox dynamically in javascript 
Javascript :: html onchange call js function 
Javascript :: swap in javascript 
Javascript :: mongodb find all that dont have property 
Javascript :: useReducer 
Javascript :: addition of all elements of array in js 
Javascript :: set input value vanilla js 
Javascript :: How to get latitude and longitude from address in angular 6 
Javascript :: determine if touch screen js 
Javascript :: jshint ignore 
Javascript :: how to appendChild in the begin of the div javascript 
Javascript :: react native float upto 2 digits 
Javascript :: dropdown validation using jquery 
Javascript :: create an element jquery 
Javascript :: bin2hex in js 
Javascript :: javascript select multiple values 
Javascript :: js get node index 
Javascript :: foreach in javascript skip first 
Javascript :: js get json object keys 
Javascript :: window.onscroll 
Javascript :: js unspecified parameters 
Javascript :: javascript remove some words list from string 
Javascript :: java script login system 
Javascript :: get background image url jquery 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =