惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

TaoSecurity Blog
TaoSecurity Blog
T
Troy Hunt's Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Vercel News
Vercel News
T
Threatpost
G
Google Developers Blog
T
Threat Research - Cisco Blogs
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
The Exploit Database - CXSecurity.com
H
Heimdal Security Blog
Google DeepMind News
Google DeepMind News
Cyberwarzone
Cyberwarzone
T
The Blog of Author Tim Ferriss
Know Your Adversary
Know Your Adversary
Hacker News: Ask HN
Hacker News: Ask HN
www.infosecurity-magazine.com
www.infosecurity-magazine.com
S
Schneier on Security
B
Blog
V2EX - 技术
V2EX - 技术
NISL@THU
NISL@THU
C
CERT Recently Published Vulnerability Notes
W
WeLiveSecurity
C
Cybersecurity and Infrastructure Security Agency CISA
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Y
Y Combinator Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Spread Privacy
Spread Privacy
The Last Watchdog
The Last Watchdog
V
Vulnerabilities – Threatpost
N
Netflix TechBlog - Medium
Schneier on Security
Schneier on Security
F
Fortinet All Blogs
N
News | PayPal Newsroom
Attack and Defense Labs
Attack and Defense Labs
Blog — PlanetScale
Blog — PlanetScale
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Microsoft Security Blog
Microsoft Security Blog
S
Security @ Cisco Blogs
人人都是产品经理
人人都是产品经理
爱范儿
爱范儿
P
Privacy & Cybersecurity Law Blog
P
Proofpoint News Feed
Project Zero
Project Zero
I
Intezer
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - Franky
SecWiki News
SecWiki News
Martin Fowler
Martin Fowler

博客园 - syuko

【转】IE8 松散耦合进程框架探索 【转】Windows 文件夹的秘密:Windows 目录到底占用了多少真实的硬盘空间 【转】d:DesignInstance, d:DesignData in Visual Studio 2010 Beta2 RadTreeViewItem - event MouseLeftButtonDown or Up never fires visual studio 2005 中的部署 产生“不可恢复的生成错误” Windows 7使用记事及琐事流水帐-职称英语考试始末记事 Oracle难道不能处理大数据并发的问题 [转载]DNS解析错误解决办法 鼠标(Mouse)的复数问题告诉我们治学要严谨 Just for Fun-生存,社会秩序,娱乐 软件创作 VB6.0通过SoapToolkit访问WebService问题 [转] oracle rownum 探析 用MSIL来写一个“Hello World” 天地生人,有一人莫不有一人之业;人生在世,有一日当尽一日之勤 小窥黄鹤楼 JavaScript基础之继承(二) JavaScript基础之继承(附实例) JavaScript基础之对象
RadTreeView:How to Get Item by Path
syuko · 2011-03-18 · via 博客园 - syuko

Telerik官方说:“The RadTreeView API offers you the ability to get an item by path programmatically. This tutorial will show you how to do that.”。并给出了如下的使用方法:

For example, see the following situation - you want to retrieve the treeview item with Header Soccer. In order to do that you need to perform the following steps:

1. Create a path, including only the treeview items' header and using some separator.

2. Set the telerik:TextSearch.TextPath attached property to indicate which property to be used as a path segment.

3. Invoke the GetItemByPath() method of the RadTreeView class. 

和例子:

private void GetTreeViewItemByPath()
{
   
string path = "Sport Categories|Football|Soccer";
   RadTreeViewItem targetItem = radTreeView.GetItemByPath( path,
"|" );
}

其中Telerik列举了很多注意事项,其中有一条是:“Using the GetItemByPath() method of the RadTreeViewItem class is a potentially expensive operation if the item is not visible. The method will recursively expand and scroll items into view, updating the layout numerous times. Almost certainly the method should not be called in a loop (multiple times). If you need to do so, there is probably a better way to achieve what you need.”,这句话说明了节点不可见时是一项比较消耗资源的操作,可Telerik没说当整个RadTreeView不可见(或不属于当前选中窗体)时该方法会返回Null,所以在实际多选项卡的应用程序中,如果调用一个不是当前选项卡页面(或是隐藏)里的RadTreeView的GetItemByPath时一般返回的就是Null。正确的做法是先将该选项卡设为Selected或isHidden=false然后再去GetItemByPath;