Node.Select()火灾RadTreeView的Node_Click()事件? [英] Node.Select() Fires the Node_Click() Event in RadTreeView?
问题描述
每次当您试图从JavaScript它会调用aspx.cs事件是Node_Click()如果你想使两个功能,这使得很多在code分离麻烦调用Node.select()?
everytime when you try to call the Node.select() from javascript it will call the aspx.cs event which is Node_Click() which makes alot trouble in code seperation if you wanna make two functions?
推荐答案
它一直像5心爱的马,我试图找出该问题的解决方案,因为每次我尝试设置使用的JavaScript端选择的节点以下code:
it's been like 5 hourse for me trying to figure out the solution for that problem , because each time I try to set the node selected from the javascript side using the following code:
var nodes=$find("<%= RadTreeView1.ClientID %>").get_allNodes();
var node1=nodes[0];
node1.Select();
//这里还调用服务器事件,为int的aspx.cs页面,
//here it calls also the Server event which is the Node_Click() event int the aspx.cs page,
所以经过漫长的困难时期,我发现,如果你想选择在JavaScript中的一个节点,而不触发事件使用下面的函数:
so after a long hard time with that I found out that If you wanna select a node in javascript without firing the event use the following function:
node1.set_selected(true);
我希望,因为,因为我不想让你花几个小时试图我可以受益你们
发现这一点。
I hope that I could benefit you guys because because I dont want you to spend hours trying to find this out.
好运
这篇关于Node.Select()火灾RadTreeView的Node_Click()事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!