473,383 Members | 1,725 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,383 software developers and data experts.

treeview handle by database

i want to learn treeview handle by database
Aug 3 '07 #1
4 1029
shweta123
692 Expert 512MB
Hi,

What platform are you using and What do you want to do with the treeview?

i want to learn treeview handle by database
Aug 3 '07 #2
gmail
8
Hi,

What platform are you using and What do you want to do with the treeview?

Hi Friend,
I am also trying to get somme info about tree view . can you please let me kinow about the reusability of tree view.

TIOA,
Gmail
Aug 3 '07 #3
Frinavale
9,735 Expert Mod 8TB
Have you guys checked out MSDN's Library on the TreeView Class?

It has a lot of examples in both VB.NET and C#.


Cheers!
-Frinny
Aug 3 '07 #4
shweta123
692 Expert 512MB
Hi,

You can have this code to add nodes using db.
Expand|Select|Wrap|Line Numbers
  1.  Dim con As New OleDbConnection
  2.         Dim ds As New DataSet
  3.         Dim da As OleDbDataAdapter
  4.         Dim dt As New DataTable
  5.         Dim td As TreeNode
  6.         Dim td1 As TreeNode
  7.  
  8.         Dim sql As String
  9.  
  10.         con.ConnectionString = "Provider=SQLOLEDB.1;............"
  11.         con.Open()
  12.  
  13.         sql = "Select .............."
  14.         da = New OleDbDataAdapter(sql, con)
  15.         da.Fill(dt)
  16.  
  17.         For i As Integer = 0 To dt.Rows.Count - 1
  18.             td = New TreeNode(dt.Rows(i).Item(0))
  19.             ' To add Parent nodes
  20.             TreeView1.Nodes.Add(td)
  21.  
  22.             ' To add the child nodes
  23.              td1 = New TreeNode(dt.Rows(i).Item(0))
  24.             td.Nodes.Add(td1)
  25.         Next
  26.         con.Close()
Aug 3 '07 #5

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

Similar topics

0
by: Martin Russ | last post by:
Hi, Although this is in VB.NET, I don't believe it's language specific. I have an application that has several panes (similar to Visual Studio in the Solution Explorer - Solution, Search,...
3
by: Steve | last post by:
Visual Studio 2003 .NET / C# I have a treeview object on a form which acts as the main menu controller for my application. the treeview is always in sight, and the form it is on acts as the...
1
by: Anthony Boudouvas | last post by:
Hi to all, i have a treeview that i put some nodes in it with their repsective images. If i try to change the image and set it to some other ImageList index, nothing happens. The code i use...
2
by: Sonia Igla | last post by:
Hi. I need to perform DBLCLK on TreeView Node. I try the following: private static extern int SendMessage(IntPtr hWnd, uint msg, UInt32 wParam, UInt32 lParam); private const UInt32...
6
by: Dean L. Howen | last post by:
Hi, I want to add some attributes to TreeNode, so I create a new class MyNode that inheritance from System.Windows.Forms.TreeNode, I want to TreeView use MyNode instead of TreeNode, so I can...
5
by: rh | last post by:
I created a user control that is made up of a TreeView and a VScrollBar. I set the TreeView.FullRowSelect = True and it works as expected (full row is visible, appears on top of everything else)...
3
by: sianan | last post by:
Hi, I want to display a 'hover box' (for want of a better description) when the mouse hovers over a node in a tree view. The box would display detail information for the node. It should be...
18
by: =?Utf-8?B?TGkgV2VuZw==?= | last post by:
Hi, Is there a way for TreeView to have multiple selections? But I am not talking about its checked boxes. I want a way similar to ListView with MultiSelect = True. So I can use or key and...
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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...

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.