Click here to Skip to main content
15,902,938 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionDisk space on Linux Pin
Matodzi3-Jun-08 23:19
Matodzi3-Jun-08 23:19 
AnswerRe: Disk space on Linux Pin
ChandraRam4-Jun-08 1:27
ChandraRam4-Jun-08 1:27 
GeneralRe: Disk space on Linux Pin
Matodzi4-Jun-08 1:47
Matodzi4-Jun-08 1:47 
AnswerRe: Disk space on Linux Pin
Chinners4-Jun-08 1:50
Chinners4-Jun-08 1:50 
QuestionLabel repaint issue Pin
divyesh14323-Jun-08 23:10
divyesh14323-Jun-08 23:10 
AnswerRe: Label repaint issue Pin
Christian Graus4-Jun-08 3:58
protectorChristian Graus4-Jun-08 3:58 
GeneralRe: Label repaint issue Pin
divyesh14324-Jun-08 20:32
divyesh14324-Jun-08 20:32 
QuestionTreeView from Database or DataTable Pin
Muhammad Waseem Tahir3-Jun-08 22:54
professionalMuhammad Waseem Tahir3-Jun-08 22:54 
Dear All!

I am looking a code for multi level adding treeview using Vb.NET for Winforms.... i am not sure my approach is good or not, but i am stuck on 2nd level..... what shall i do i don't know any body can help me my project is pending due to this.. on next stage we we disscuss drag and drop..... some code not there for more understanding...



My Data Looks like.....

ID Name PID LEVEL

1 Root1 1 0

2 Root2 2 0

101 Root 1 Child 1 1 1

102 Root 1 Child 2 1 1

201 Root 2 Child 1 2 1

10101 Root 1 Child 1 Child 1 101 2

10102 Root 1 Child 1 Child 2 101 2




Dim DT As New DataTable("HRV")
Dim DC As DataColumn

Sub MakeTable()
Sub Data()

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
MakeTable()

Data()

Me.DataGridView1.DataSource = DT
PopulateTreeView()

End Sub

Sub PopulateTreeView()

For Each row As DataRow In DT.Rows
Select Case row("level")
Case 0
TreeView1.Nodes.Add(row("PID"), row("Name"))

Case 1
Dim FD() As TreeNode

Dim k As String

k = row("PID")

FD = TreeView1.Nodes.Find(k, True)
TreeView1.Nodes(FD(0).Name).Nodes.Add(row("PID"), row("Name"))

Case 2


End Select
Next

End Sub
AnswerRe: TreeView from Database or DataTable Pin
ChandraRam4-Jun-08 1:04
ChandraRam4-Jun-08 1:04 
GeneralRe: TreeView from Database or DataTable Pin
Muhammad Waseem Tahir4-Jun-08 19:05
professionalMuhammad Waseem Tahir4-Jun-08 19:05 
GeneralRe: TreeView from Database or DataTable Pin
ChandraRam4-Jun-08 19:26
ChandraRam4-Jun-08 19:26 
GeneralRe: TreeView from Database or DataTable Pin
Muhammad Waseem Tahir4-Jun-08 21:20
professionalMuhammad Waseem Tahir4-Jun-08 21:20 
GeneralRe: TreeView from Database or DataTable Pin
Muhammad Waseem Tahir4-Jun-08 22:43
professionalMuhammad Waseem Tahir4-Jun-08 22:43 
QuestionFocus Missing in windows forms Pin
Sree Nivas3-Jun-08 20:03
Sree Nivas3-Jun-08 20:03 
AnswerRe: Focus Missing in windows forms Pin
Anubhava Dimri3-Jun-08 20:44
Anubhava Dimri3-Jun-08 20:44 
QuestionDataGrid to Excel Pin
New_Coder3-Jun-08 13:47
New_Coder3-Jun-08 13:47 
AnswerRe: DataGrid to Excel Pin
Sam Xavier3-Jun-08 18:59
Sam Xavier3-Jun-08 18:59 
GeneralRe: DataGrid to Excel Pin
New_Coder4-Jun-08 10:43
New_Coder4-Jun-08 10:43 
AnswerRe: DataGrid to Excel Pin
Anubhava Dimri3-Jun-08 20:46
Anubhava Dimri3-Jun-08 20:46 
QuestionCan we use XNA in VB.NET like C#.NET ? Pin
Mohammad Dayyan3-Jun-08 8:16
Mohammad Dayyan3-Jun-08 8:16 
AnswerRe: Can we use XNA in VB.NET like C#.NET ? Pin
jzonthemtn3-Jun-08 11:44
jzonthemtn3-Jun-08 11:44 
QuestionShare Point Services Pin
FriendlySoluations3-Jun-08 3:57
FriendlySoluations3-Jun-08 3:57 
Questionadd reply to the next node Pin
Shanmugapriya.G3-Jun-08 0:45
Shanmugapriya.G3-Jun-08 0:45 
AnswerRe: add reply to the next node Pin
ChandraRam3-Jun-08 1:27
ChandraRam3-Jun-08 1:27 
AnswerRe: add reply to the next node Pin
Anubhava Dimri3-Jun-08 21:10
Anubhava Dimri3-Jun-08 21:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.