Click here to Skip to main content
16,006,531 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionvb directory treeview checkbox Pin
imka247-Dec-08 21:32
imka247-Dec-08 21:32 
AnswerRe: vb directory treeview checkbox Pin
ChandraRam7-Dec-08 22:30
ChandraRam7-Dec-08 22:30 
QuestionRequest for code in VB .NET Pin
sap_sid_i107-Dec-08 21:06
sap_sid_i107-Dec-08 21:06 
AnswerRe: Request for code in VB .NET Pin
Ashfield8-Dec-08 1:20
Ashfield8-Dec-08 1:20 
AnswerRe: Request for code in VB .NET Pin
Christian Graus8-Dec-08 10:01
protectorChristian Graus8-Dec-08 10:01 
GeneralRe: Request for code in VB .NET Pin
EliottA8-Dec-08 11:32
EliottA8-Dec-08 11:32 
GeneralRe: Request for code in VB .NET Pin
Christian Graus8-Dec-08 14:19
protectorChristian Graus8-Dec-08 14:19 
QuestionPopulating Treeview from DB - Stops at 3rd level Pin
ErikKoz7-Dec-08 13:51
ErikKoz7-Dec-08 13:51 
This is probably more of a beginner issue, but Im trying to populate a treeview based off the Northwind Database. The Top level is a list of countries, second level is a list of customers from that country, and 3rd level is supposed to be orderids from that country but it isnt populating. I know its stopping at my 'FillOrderIDs' but I cant seem to figure out why.

I appreciate any advice,

Private Sub FillCountries()
    Dim tcountry As String
    Dim tnode As TreeNode
    Dim tCountryTable As NorthwindDataSet.CountriesDataTable
    tCountryTable = Me.CountriesTableAdapter.GetCountriesData
    For Each trow As NorthwindDataSet.CountriesRow In tCountryTable

        tcountry = trow.Country
        tnode = New TreeNode
        tnode.Name = "Country"
        tnode.Text = tcountry
        Me.TreeView1.TopNode.Nodes.Add(tnode)
        FillCompanyNames(tcountry, tnode)
    Next
End Sub

Private Sub FillCompanyNames(ByVal country As String, ByVal parentnode As TreeNode)
    Dim tCompany As String
    Dim tnode As TreeNode
    Dim CustTable As NorthwindDataSet.CompanyNamesDataTable
    CustTable = Me.CompanyNamesTableAdapter.GetCustomersByCountry(country)

    For Each trow As NorthwindDataSet.CompanyNamesRow In CustTable
        tCompany = trow.CompanyName
        tnode = New TreeNode
        tnode.Name = "CompanyName"
        tnode.Text = trow.CompanyName
        tnode.Tag = trow.CompanyName
        parentnode.Nodes.Add(tnode)
        FillOrderIDs(tCompany, tnode)
    Next

End Sub

Private Sub FillOrderIDs(ByVal orderid As String, ByVal parentnode As TreeNode)
    Dim tnode As TreeNode
    Dim OrdTable As NorthwindDataSet.OrderIdsDataTable
    OrdTable = Me.OrderIdsTableAdapter.GetOrderIds(CompanyName)

    For Each trow As NorthwindDataSet.OrderIdsRow In OrdTable
        tnode = New TreeNode
        tnode.Name = "OrderID"
        tnode.Text = trow.OrderID
        tnode.Tag = trow.OrderID
        parentnode.Nodes.Add(tnode)
    Next
End Sub

Private Sub btnDisplay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisplay.Click
    TreeView1.Nodes.Add("Countries")
    FillCountries()
End Sub

QuestionOK I'm Confused - Visible code from a compiled version Pin
TheComputerMan7-Dec-08 12:09
TheComputerMan7-Dec-08 12:09 
AnswerRe: OK I'm Confused - Visible code from a compiled version Pin
Dave Kreskowiak7-Dec-08 12:54
mveDave Kreskowiak7-Dec-08 12:54 
GeneralRe: OK I'm Confused - Visible code from a compiled version Pin
TheComputerMan7-Dec-08 21:48
TheComputerMan7-Dec-08 21:48 
GeneralRe: OK I'm Confused - Visible code from a compiled version Pin
Luc Pattyn7-Dec-08 15:26
sitebuilderLuc Pattyn7-Dec-08 15:26 
GeneralRe: OK I'm Confused - Visible code from a compiled version Pin
TheComputerMan7-Dec-08 21:49
TheComputerMan7-Dec-08 21:49 
GeneralRe: OK I'm Confused - Visible code from a compiled version Pin
Luc Pattyn7-Dec-08 23:07
sitebuilderLuc Pattyn7-Dec-08 23:07 
QuestionCheckbox treeview Pin
imka247-Dec-08 8:05
imka247-Dec-08 8:05 
AnswerRe: Checkbox treeview Pin
Christian Graus7-Dec-08 10:17
protectorChristian Graus7-Dec-08 10:17 
GeneralRe: Checkbox treeview Pin
imka247-Dec-08 21:30
imka247-Dec-08 21:30 
QuestionHow to protect a windows service from being SIG-KILL'd, even by Full Control Account? Pin
_Khallaf6-Dec-08 9:44
_Khallaf6-Dec-08 9:44 
AnswerRe: How to protect a windows service from being SIG-KILL'd, even by Full Control Account? Pin
Dave Kreskowiak6-Dec-08 14:38
mveDave Kreskowiak6-Dec-08 14:38 
GeneralRe: How to protect a windows service from being SIG-KILL'd, even by Full Control Account? [modified] Pin
_Khallaf6-Dec-08 18:08
_Khallaf6-Dec-08 18:08 
GeneralRe: How to protect a windows service from being SIG-KILL'd, even by Full Control Account? Pin
Dave Kreskowiak7-Dec-08 3:26
mveDave Kreskowiak7-Dec-08 3:26 
GeneralRe: How to protect a windows service from being SIG-KILL'd, even by Full Control Account? Pin
_Khallaf7-Dec-08 10:36
_Khallaf7-Dec-08 10:36 
GeneralRe: How to protect a windows service from being SIG-KILL'd, even by Full Control Account? Pin
Dave Kreskowiak7-Dec-08 12:28
mveDave Kreskowiak7-Dec-08 12:28 
GeneralRe: How to protect a windows service from being SIG-KILL'd, even by Full Control Account? Pin
_Khallaf7-Dec-08 12:55
_Khallaf7-Dec-08 12:55 
GeneralRe: How to protect a windows service from being SIG-KILL'd, even by Full Control Account? Pin
Dave Kreskowiak7-Dec-08 13:06
mveDave Kreskowiak7-Dec-08 13:06 

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.