treeView.dataSource._data[2].notifications[0].ID
How do I get the node value of a specific node in a KendoUI treeView?
-
23-06-2022 - |
Question
I need to get the node VALUE for the notificationId.
The name of the node is "ID" in the XML.
This is what I have right now:
$(function DeleteNotification (userId)
{
$('#btnDelete').on('click', function()
{
debugger;
var treeView = $('#treeview').data("kendoTreeView");
$('#treeview').find('input:checkbox:checked').each(function()
{
//this is what im trying to get but once i get to this point, nothing happens under debug mode
var notificationId = treeView.text($("#ID"));
alert(notificationId);
//treeView.remove($(this).closest('.k-item'));
});
});
});
This line is not working:
var notificationId = treeView.text($("#ID"));
If you hover over the variable "treeView" you'll see this:
I need the circled value.
Does anyone know how to do this? I've been battling with this for the past 3 days and I cannot find the information I need...
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow