使用UltratreeView(Infragistics TreeView)控件
大家好 我正在使用 infragsitics 树视图控件。我有一个返回 2 个表的存储过程 1.父表 2.子表 目前,我通过使用循环在这两个表的基础上绑定树视图,其中我获取主表的一行,创建一个节点,在子表中找到关联的记录并将其添加到父节点下。 当记录很少时,此方法效果很好。 但当记录数量较多时,确实需要花费大量时间。
有没有办法直接将数据源分配给treeview?无需手动遍历任何循环?这样我们只需要提供 2 个包含主记录和子记录的表作为数据源,树视图会自动管理它并绑定数据
请帮助.. 提前致谢
Hello All
I am using infragsitics tree view control.I have one stored procedure that returns 2 tables
1.Parent Table
2.Child Table
Currently i m Binding the treeview on the basis of these 2 tables by using loops wherein i take one row of the master table, create one node , find the associated records in child table and add it under the Parent node.
This method works fine when there are few records.
But it really takes a hell lot of time when there are high number of records.
Is there any way to directly assign datasource to treeview ? without traversing through any loops manually? such that we just need to provide 2 tables containing master and child records as the datasource and the treeview manages it automatically and binds the data
Please help..
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看这个示例 http://help .infragistics.com/Help/NetAdvantage/WinForms/2010.2/CLR2.0/html/WinTree_Displaying_WinTree_with_Columns_in_Grid_Style.html
可以将数据绑定到网格上,只要定义了父\子关系,网格就会能够显示主记录和子记录。
Take a look at this sample http://help.infragistics.com/Help/NetAdvantage/WinForms/2010.2/CLR2.0/html/WinTree_Displaying_WinTree_with_Columns_in_Grid_Style.html
You can bind the data to the grid, and as long as you define the parent\child relationship the grid will be able to display master and child records.