js单击treeview节点! 我的树型结构是从数据库中加载出来的。而我在加载的同时,我也程序选择了哪个节点被选中。我现在的问题是:当一个节点处于选中状态的时候,怎么通过客户端教本来单击这个选中的节点。不知道我的意思说明白了吗! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 提供点思路:html:function Method1(a,b){ document.all.hidA.value = a; document.all.hidB.value = b; __doPostBack('LinkButton1',''); }cs:1 在递归绑定tree时const string CLICK_TV_ITEM = "<a onclick=\"javascript:Method1({0},'{1}');\">{1}</a>";foreach(DataRow drSystem in dsCategory.Tables[0].Rows){ TreeNode node = new TreeNode(); node.NodeData = drSystem["CategoryId"].ToString(); node.Text = String.Format(CLICK_TV_ITEM,drSystem["a"],drSystem["b"]); ... }2 在linkbutton click事件里 添加触发事件 VS 2003打不开 C#文件 怎样查找XML文档 概念的问题 关于DataGridView和数据库绑定的问题 sql&C#.net 数据库日期和业务量统计问题 五一散分`` 怎么使用Menu控件绑定到Access数据库上? 有那个懂得sql高手帮我解决问题,很急,可以给钱。 请问如何用C#实现打字功能? C# 有什么控件能搞出三坐标柱状图? ================= 如何修改开始程序组名及桌面快捷方式文件名?================= 关于datagrid数据更新,大家帮忙来看一下吧
html:
function Method1(a,b)
{
document.all.hidA.value = a;
document.all.hidB.value = b;
__doPostBack('LinkButton1','');
}
cs:
1 在递归绑定tree时
const string CLICK_TV_ITEM = "<a onclick=\"javascript:Method1({0},'{1}');\">{1}</a>";foreach(DataRow drSystem in dsCategory.Tables[0].Rows)
{
TreeNode node = new TreeNode();
node.NodeData = drSystem["CategoryId"].ToString();
node.Text = String.Format(CLICK_TV_ITEM,drSystem["a"],drSystem["b"]);
...
}2 在linkbutton click事件里 添加触发事件