Kendo UI Treeview Checked - Get the text of all checked nodes -


how can text of selected items in kendo ui treeview checked?

e.g alert($(this).data.text); not working. need send text of selected nodes server want information in array.

$("#treeview .k-item input[type=checkbox]:checked").closest(".k-item").each(function () {                    // change whatever want, example:                    **alert($(this).data.text);**                    $(this).css("color", "green");                }); 

thank you. hardeep

try this:

var result = new array(); var treeview = $("#treeview").data("kendotreeview");  $("#treeview .k-item input[type=checkbox]:checked").closest(".k-item").each(function () {     var text = treeview.dataitem($(this)).text; // .id id     result.push(text); }); 

then send result array server.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

php - Accessing static methods using newly created $obj or using class Name -