0

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日間これと戦っていますが、必要な情報が見つかりません...

4

1 に答える 1

1
treeView.dataSource._data[2].notifications[0].ID
于 2013-08-05T18:24:33.960 に答える