473,386 Members | 1,883 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

C# - Treeview data into a Table SQL Server

I would like to know how can I take the nodes of a treeview and store them into a SQL Server table so I can then visualize them in a DataGridView. Also I would like to store the information in a Xpath way.

Thanks

Christopher M. Contreras
Sep 16 '07 #1
3 2371
vanc
211 Expert 100+
I would like to know how can I take the nodes of a treeview and store them into a SQL Server table so I can then visualize them in a DataGridView. Also I would like to store the information in a Xpath way.

Thanks

Christopher M. Contreras
So the idea should be like....you create a node table which contains all information about TreeNode, of course you can't store events. Then you start from the RootNode to the very end node and create nodes in node table.
Or if you just need to visualize them in DataGridView, you actually don't have to store nodes in database. But the best way to do it is to store the node object in database which is I don't know how to do hehe.... maybe in OO database???

cheers.
Sep 16 '07 #2
So the idea should be like....you create a node table which contains all information about TreeNode, of course you can't store events. Then you start from the RootNode to the very end node and create nodes in node table.
Or if you just need to visualize them in DataGridView, you actually don't have to store nodes in database. But the best way to do it is to store the node object in database which is I don't know how to do hehe.... maybe in OO database???

cheers.
How can I just represent the treeview int a datagridview, and I will also like if it is possible to represent in the Datagridview in a Xpath form.
Sep 17 '07 #3
vanc
211 Expert 100+
How can I just represent the treeview int a datagridview, and I will also like if it is possible to represent in the Datagridview in a Xpath form.
Basically, DataGridView is a view like database table, so you have to create rows and columns to reflect values of a TreeNode, such as Name, Value, etc.

for eg: Name Value Index
firstnode 123 0
secnode 234 1

About Xpath, I don't remember about this part, give me time to recall the memory belong.

cheers.
Sep 17 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: SoKool | last post by:
Can anyone point me to a site where I can get a free treeview control to use in ASP .NET or any tutorial that can help me build my own treeview control. I intend to use a treeview to generate a...
7
by: Mike | last post by:
hi everyone! i'm searching for a tutorial or an example for how to fill a treeview with information from my ms sql database. i've found some on "code project" and other sites, but nothing like a...
0
by: Björn Bengtsson | last post by:
Hello! I have an urgent problem concerning ASP.NET, ADO.NET, SQL Server, XML and the TreeView control. I have two tables; one describing the products and one describing their relationships. A...
3
by: Peter | last post by:
Hello, We are inserting a side menu to our application using a class that is writing HTML on all our pages. This is a part of the code as an example: writer.Write(" <table WIDTH=""100%""...
7
by: vsiat | last post by:
I am trying to create a treeview out of a database table with the typical structure ID, NAME, PARENTID, TYPE, EXTRA_INFO, where is linked to the . What I want to achieve is create a tree made...
5
by: lanem | last post by:
I want to display some drill-down data with a datagrid look. I can get the exact functionality I want with a treeview, but I don't like the way the treeview looks and formats the data. I want a...
0
by: apenly | last post by:
Hi all- I'm trying to Render a TreeView in a custom control, but I'm receiving a NullReferenceException at runtime. If I put the TreeView on the page it works fine, but as soon as I try to...
3
by: Jeff | last post by:
Hey ..NET 2.0 I'm trying to search a TreeView control for a specific TreeNode The code below doesn't work because it only searches the the top level of the nodes. I would like to program it...
7
by: Joe Cool | last post by:
Let's say I have a Treeview control on a form. Each leaf node in the Treeview has a ContextMenuStrip, each with one ToolStripMenuItem, and all ToolStripMenuItems Click event is handled by a comment...
2
by: makennedy | last post by:
Hi Experts, Please help, I am a newbie to ASP.NET 2.0 may be I am doing something wrong or there may be a bug somewhere. Basically I have a TreeView Control which I have created...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.