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

推荐订阅源

Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
SegmentFault 最新的问题
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Attack and Defense Labs
Attack and Defense Labs
F
Full Disclosure
Vercel News
Vercel News
N
News | PayPal Newsroom
The GitHub Blog
The GitHub Blog
H
Hacker News: Front Page
H
Heimdal Security Blog
P
Privacy International News Feed
博客园 - 司徒正美
Google DeepMind News
Google DeepMind News
N
Netflix TechBlog - Medium
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cisco Blogs
L
Lohrmann on Cybersecurity
D
Docker
Recent Announcements
Recent Announcements
Security Archives - TechRepublic
Security Archives - TechRepublic
人人都是产品经理
人人都是产品经理
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Proofpoint News Feed
T
Tailwind CSS Blog
C
Check Point Blog
博客园 - 叶小钗
Google Online Security Blog
Google Online Security Blog
Martin Fowler
Martin Fowler
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
S
Secure Thoughts
博客园 - Franky
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
P
Palo Alto Networks Blog
Latest news
Latest news
量子位
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 三生石上(FineUI控件)
The Cloudflare Blog
Last Week in AI
Last Week in AI
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Cyberwarzone
Cyberwarzone
小众软件
小众软件
Cisco Talos Blog
Cisco Talos Blog
Hacker News: Ask HN
Hacker News: Ask HN
T
Threatpost
T
Tenable Blog
P
Privacy & Cybersecurity Law Blog
WordPress大学
WordPress大学

博客园 - 追逐苦痛

20230509001 - DataTable 导出成Excel 20230425001 - DataGridView绑定了数据之后, 再添加CheckBox列的解决方案 20230424001 - 打开文件对话框OpenFileDialog类 20200812001 - SQL openquery 传参数 ASP.net用Graphics实现的统计图(折线图、柱状图、饼图) 20190917002 - SQL 中处理交叉重复条件参考 20190917001 - 去除DataTable中重复的数据 20190410001 - 遍历控件参考 20180709001 - 委托传值 20180706001 - 动态添加 tabPage 20180519001 - DataTable Group by功能参考 20161020001 DataGridView 选中的 DataGridViewCheckBoxCell 不添加重复项 20161014006 DataGridView Combobox 数据绑定与传值 20161014001 DataGridView 单元格内容 自动计算 20161013001 DataGridView 数据转 DataTable 20160929001 Guid生成 20160815001 - 修改字段的长度 20160715001 - 分发与订阅 总结 20160712001 SQL server R2 更名
20161011001 treeView 递归
追逐苦痛 · 2016-10-11 · via 博客园 - 追逐苦痛

protected void FillTree()
        {
            H_data H_data = new H_data();

            H_data.sql_text1 = " select [FID],[N_Name],[N_Parent_ID] FROM [PLM].[dbo].[T_Sys_File_Tree] ";
            H_data.select_tables();
            DataSet1 = H_data.DataSet8;
            DataTable dt = DataSet1.Tables[0];
            //this.dataGridView1.DataSource = dt;

            NodeLoad(0, null);
        }
        private void NodeLoad(int parentId, TreeNode upNode)
        {
            DataView dv = new DataView(DataSet1.Tables[0]);
            dv.RowFilter = string.Format("N_Parent_ID = {0}", parentId);
            foreach (DataRowView drv in dv)
            {
                if (upNode == null)
                {
                    TreeNode newNode = this.treeView1.Nodes.Add(drv[1].ToString());
                    newNode.Tag = drv[0].ToString();
                    NodeLoad(Int32.Parse(drv[0].ToString()), newNode);
                    newNode.Expand();
                }
                else
                {
                    TreeNode newNode = upNode.Nodes.Add(drv[1].ToString());
                    newNode.Tag = drv[0].ToString();
                    NodeLoad(Int32.Parse(drv[0].ToString()), newNode);
                    newNode.Expand();
                }
            }

            //展开组件中的所有节点
            //treeView1.SelectedNode.ExpandAll();
            //定位根节点
            //treeView1.SelectedNode = treeView1.Nodes[0];
            treeView1.SelectedNode = null;
        }