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
Post a Comment