Results 1 to 3 of 3

Thread: 2 quick questions

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2000
    Posts
    49

    2 quick questions

    I've just started VB.net after a couple of years of VB6 and am having 2 immediate problems:

    1/ I want to change the value of a data grid based on the value in a combo box. What do you use in .net to to emulate the 'on change' in VB 6.

    I can do this quite happily using a 'button_click' to invoke the update of the data grid, but it is too clunky!

    2/ Does anyone know a good article showing how to dynamically build a treeview using .Net?

    Thanks

    Ian

  2. #2
    Addicted Member
    Join Date
    Mar 2001
    Location
    Devon, UK
    Posts
    181
    If you find an article about dynamically building a treeview post it here as i would be grateful for that. The way i do it at the mo is a little clunky to say the least!
    Wind and waves resolves all problems.

  3. #3
    Registered User jkw119's Avatar
    Join Date
    Oct 2001
    Location
    Pittsburgh
    Posts
    256
    VB Code:
    1. Private Sub combobox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles combobox1.SelectedIndexChanged
    2.      If Combobox1.selectedindex = 1 then
    3.                Me.DataGrid1.SetDataBinding(DataSet1, "DataSet1")
    4.      End If
    5.      If Combobox1.selectedindex = 2 then
    6.                Me.DataGrid1.SetDataBinding(DataSet2, "DataSet2")
    7.      End If
    8. End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width