Dyna树以编程方式选择多个节点不起作用

时间:2019-02-28 15:36:35

标签: jquery asp.net-mvc-5 dyantree

在下面的for循环中,有3个节点键,但是下面的代码仅选择了dyna-tree中的第一个键节点,而其他两个节点都没有被选择。请在这里帮助我要选择我要传递给循环的所有3个节点

function SelectFavouriteValues(result,drpName){

var responseObject = JSON.parse(result);

//for (itm = 0; itm < responseObject.length; itm++)
//{
    var filterName = responseObject[0].ItemArray[3];
    var filterValue = responseObject[0].ItemArray[4].split(",");

//in below for loop there are 3 node keys are there but below code is only selecting first key in dyna tree other two nodes are not getting selected
    for (i = 0; i < filterValue.length; i++) {

        $(drpName).treeSelect("getDynatreeContainer").dynatree("getTree").getNodeByKey(filterValue).select();
    }
//}   

}

0 个答案:

没有答案