在树视图中隐藏节点 [英] Hide node in treeview

查看:101
本文介绍了在树视图中隐藏节点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用一个超链接构造一个站点地图,我给它文本"和一个值路径",该站点地图引用到一个树视图,只有两个级别的父级和子级...

我清除了treeview(treeview.nodes.clear)仅放置了两个级别,并且他丢失了值路径..

I am constructing a sitemap in a hyperlink wich I give the ''text'' and a ''valuepath'' that sitemap is referent to a treeview wich only has two levels parent and child...

I clear the treeview (treeview.nodes.clear) to put only two levels and he loses the valuepath..

推荐答案

您可以尝试使用event.preventDefault()方法那个.

例如.

you can try event.preventDefault() method for that.

eg.

//put it in doument ready method.as globle var
var isToPreventDefault=false;


//make is ture on any event or your condition.
if(yourCondition){
isToPreventDefault = true;
}


//put it in doument ready method.


(" ).click(>功能 (e){ 如果(isToPreventDefault) event.preventDefault(); });
("#selectorOfYourAnchor").click(function(e){ if(isToPreventDefault ) event.preventDefault(); });


这篇关于在树视图中隐藏节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆