繁体   English   中英

如何在KendoUI treeView中获取特定节点的节点值?

[英]How do I get the node value of a specific node in a KendoUI treeView?

我需要获取NotificationId的节点VALUE。

节点的名称在XML中为“ ID”。

这就是我现在所拥有的:

$(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'));
        });
    });
});

该行不起作用:

var notificationId = treeView.text($("#ID"));

如果将鼠标悬停在变量“ treeView”上,将会看到以下内容:

我需要带圆圈的值。

有谁知道如何做到这一点? 在过去的3天里,我一直在与之抗争,但找不到所需的信息...

treeView.dataSource._data[2].notifications[0].ID

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM