Click here to Skip to main content
15,896,063 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Populating the Treeview control in VB Pin
DaveAuld20-Apr-10 3:18
professionalDaveAuld20-Apr-10 3:18 
GeneralRe: Populating the Treeview control in VB Pin
ratbags20-Apr-10 3:38
ratbags20-Apr-10 3:38 
GeneralRe: Populating the Treeview control in VB Pin
DaveAuld20-Apr-10 3:46
professionalDaveAuld20-Apr-10 3:46 
GeneralRe: Populating the Treeview control in VB Pin
ratbags20-Apr-10 6:36
ratbags20-Apr-10 6:36 
GeneralRe: Populating the Treeview control in VB Pin
DaveAuld20-Apr-10 8:20
professionalDaveAuld20-Apr-10 8:20 
GeneralRe: Populating the Treeview control in VB Pin
ratbags20-Apr-10 10:02
ratbags20-Apr-10 10:02 
GeneralRe: Populating the Treeview control in VB Pin
DaveAuld20-Apr-10 19:15
professionalDaveAuld20-Apr-10 19:15 
GeneralRe: Populating the Treeview control in VB Pin
ratbags20-Apr-10 21:46
ratbags20-Apr-10 21:46 
Got that a few minutes after your last response - thanks.
I have all the ones on your list plus some others.

I have managed to get the references to validate nearly all my code except
some members see below (sorry for the length of the snippet)
[The actual problems bits are "parentnode.Nodes" where the error message says
"'Nodes' is not a member of 'System.Web.UI.Webcontrols.Treenode" also the same for
"Childnode.Tag" where "'Tag' is not a member of 'System.Web.UI.Webcontrols.Treenode"
Maybe these members are deprecated and I can replace with something else?
Anyway, let me know what you think]:

Dim DSNWind As DataSet
Dim CNnwind As New OdbcConnection("Dsn=MyLocalSQLDSN2;uid=root;pwd=jivers21")
Dim DACustomers As New OdbcDataAdapter("SELECT CustomerID, CompanyName, ContactName, Country FROM customers WHERE country = 'Germany'", CNnwind)
Dim DAOrders As New OdbcDataAdapter("SELECT CustomerID, OrderID, OrderDate, ShippedDate, ShipVia, Freight FROM orders where customerid in (select customerid from customers where country = 'Germany')", CNnwind)
Dim DAOrderDetails As New OdbcDataAdapter("Select * from [Order Details] where OrderID in (SELECT OrderID FROM orders where customerid in (select customerid from customers where country = 'Germany'))", CNnwind)

DSNWind = New DataSet()
CNnwind.Open()
DACustomers.Fill(DSNWind, "dtCustomers")
DAOrders.Fill(DSNWind, "dtOrders")
DAOrderDetails.Fill(DSNWind, "dtOrderDetails")
'Close the connection to the data store; free up the resources
CNnwind.Close()

'Create a data relation object to facilitate the relationship between the Customers and Orders data tables.
DSNWind.Relations.Add("CustToOrd", DSNWind.Tables("dtCustomers").Columns("CustomerID"), DSNWind.Tables("dtOrders").Columns("CustomerID"))
DSNWind.Relations.Add("OrdToDet", DSNWind.Tables("dtOrders").Columns("OrderID"), DSNWind.Tables("dtOrderdetails").Columns("OrderID"))
'''''''''''''''''''''''
TreeView1.Nodes.Clear()
Dim i, n As Integer
Dim parentrow As DataRow
Dim ParentTable As DataTable
ParentTable = DSNWind.Tables("dtCustomers")

For Each parentrow In ParentTable.Rows
Dim parentnode As TreeNode
parentnode = New TreeNode(parentrow.Item(0))
TreeView1.Nodes.Add(parentnode)
''''populate child'''''
'''''''''''''''''''''''
Dim childrow As DataRow
Dim childnode As TreeNode
childnode = New TreeNode()
For Each childrow In parentrow.GetChildRows("CustToOrd")
childnode = parentnode.Nodes.Add(childrow(0) & " " & childrow(1) &" " childrow(2))
childnode.Tag = childrow("OrderID")
''''populate child2''''
''''''''''''''''''''''''''
Dim childrow2 As DataRow
Dim childnode2 As TreeNode
childnode2 = New TreeNode()
For Each childrow2 In childrow.GetChildRows("OrdToDet")
childnode2 = childnode.Nodes.Add(childrow2(0))
Next childrow2
& ''''''''''''''''''''''''

Next childrow
'''''''''''''''
Next parentrow
GeneralRe: Populating the Treeview control in VB Pin
DaveAuld20-Apr-10 21:53
professionalDaveAuld20-Apr-10 21:53 
GeneralRe: Populating the Treeview control in VB Pin
ratbags21-Apr-10 0:23
ratbags21-Apr-10 0:23 
GeneralRe: Populating the Treeview control in VB Pin
DaveAuld20-Apr-10 3:49
professionalDaveAuld20-Apr-10 3:49 
QuestionMS Word and VB Webservices Pin
RossouwDB20-Apr-10 0:19
RossouwDB20-Apr-10 0:19 
AnswerRe: MS Word and VB Webservices Pin
Michel Godfroid20-Apr-10 0:53
Michel Godfroid20-Apr-10 0:53 
GeneralRe: MS Word and VB Webservices Pin
Michel Godfroid20-Apr-10 0:56
Michel Godfroid20-Apr-10 0:56 
QuestionCan visual basic be inserted in Dreamweaver? Pin
josephong19-Apr-10 22:11
josephong19-Apr-10 22:11 
AnswerRe: Can visual basic be inserted in Dreamweaver? Pin
Michel Godfroid20-Apr-10 0:38
Michel Godfroid20-Apr-10 0:38 
QuestionHelp in Crystal Report Selection Formula Pin
anandbpsri19-Apr-10 21:09
anandbpsri19-Apr-10 21:09 
QuestionCrystal report help Pin
anandbpsri19-Apr-10 21:05
anandbpsri19-Apr-10 21:05 
NewsCode Protection Pin
Oguz Bastemur19-Apr-10 13:50
Oguz Bastemur19-Apr-10 13:50 
GeneralRe: Code Protection Pin
Dalek Dave19-Apr-10 13:56
professionalDalek Dave19-Apr-10 13:56 
GeneralRe: Code Protection Pin
Oguz Bastemur19-Apr-10 14:52
Oguz Bastemur19-Apr-10 14:52 
GeneralRe: Code Protection Pin
_Damian S_19-Apr-10 15:56
professional_Damian S_19-Apr-10 15:56 
GeneralRe: Code Protection Pin
Paul Conrad20-Apr-10 6:51
professionalPaul Conrad20-Apr-10 6:51 
RantRe: Code Protection Pin
Ashfield20-Apr-10 9:07
Ashfield20-Apr-10 9:07 
QuestionSilverlight and VB.Net and VB Express question Pin
jerryj19-Apr-10 11:35
jerryj19-Apr-10 11:35 

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.