Hello newsgroup,
i need a recursive funtion to fill a treeviewstructu re.
my table looks like this:
category_id, Category, Parent
where Parent points to category_id when it is a subentry.
Now I use this to read all data of the table:
Dim strSQL As String
strSQL = "SELECT * FROM categories"
Dim myConnection As SqlConnection
myConnection = New SqlConnection(m _connStr)
Dim mySqlDataAdapte r As SqlDataAdapter = New SqlDataAdapter( strSQL,
myConnection)
Dim myDataSet As DataSet = New DataSet
Dim i As Integer
mySqlDataAdapte r.Fill(myDataSe t, "Categories ")
Now I need a function to enumerate through all the data in the dataset and
add the nodes to the treeview and calling itself if subentries have to be
entered.
How do I do such a thing?
I am an absolute newbie with .NET
Thanks for your help
Andreas
i need a recursive funtion to fill a treeviewstructu re.
my table looks like this:
category_id, Category, Parent
where Parent points to category_id when it is a subentry.
Now I use this to read all data of the table:
Dim strSQL As String
strSQL = "SELECT * FROM categories"
Dim myConnection As SqlConnection
myConnection = New SqlConnection(m _connStr)
Dim mySqlDataAdapte r As SqlDataAdapter = New SqlDataAdapter( strSQL,
myConnection)
Dim myDataSet As DataSet = New DataSet
Dim i As Integer
mySqlDataAdapte r.Fill(myDataSe t, "Categories ")
Now I need a function to enumerate through all the data in the dataset and
add the nodes to the treeview and calling itself if subentries have to be
entered.
How do I do such a thing?
I am an absolute newbie with .NET
Thanks for your help
Andreas
Comment