C#使用数据集填充树视图 [英] C# Populate a treeview with Dataset
本文介绍了C#使用数据集填充树视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这就是我认为的代码,但是不起作用
This is what i think the code is but doesn''t work
DataSet1 newdataset = new DataSet1();
treeView1.Nodes.Add(newdataset.Dock_1.Rows.ToString());
并在我添加的数据集上
称为NUMBERS的数据表
然后在该表中添加了一个名为DataColumn1的列
在表单加载中,treeview1节点应如下所示
NUMBERS
+ DataColumn1
我想知道是否有人可以帮助我实现这一目标?
and on the dataset I have added
Datatable called NUMBERS
And in that table I added a column called DataColumn1
on the form load the treeview1 nodes should look like this
NUMBERS
+DataColumn1
I was wondering if anyone can help me achieve this?
推荐答案
以下链接将为您提供帮助
http://social.msdn.microsoft.com /forums/zh-CN/winformsdatacontrols/thread/704883c4-b6ad-49bd-93e6-4e9a58b15f9a/ [ DataBound TreeView控件 [
Following links will help you
http://social.msdn.microsoft.com/forums/en-US/winformsdatacontrols/thread/704883c4-b6ad-49bd-93e6-4e9a58b15f9a/[^]
DataBound TreeView Control[^]
尝试一下
http://joshsmithonwpf.wordpress.com/2007/05/05 /binding-a-treeview-to-a-dataset/ [ DataBound TreeView控件 [
try this
http://joshsmithonwpf.wordpress.com/2007/05/05/binding-a-treeview-to-a-dataset/[^]
or
DataBound TreeView Control[^]
这篇关于C#使用数据集填充树视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文