|
-
Jul 2nd, 2004, 10:32 AM
#1
Thread Starter
Member
Listbox help ## RESOLVED ##
Hello
I have 2 Listboxes, both are bound to two different tables.
How do I filter the list items in the second listbox by selecting something in the first list box?
For example, in the first listbox I have user names, if I click a username, I want the second list box to display the appropriate department this person is in.
Can this be done.
Thanks
Last edited by narmi2; Jul 4th, 2004 at 10:34 AM.
-
Jul 2nd, 2004, 11:08 AM
#2
Addicted Member
I use a DataView to Filter the DataSet Results: Something like:
Code:
Dim dv As DataView = New DataView(ds.Tables(0))
dv.RowFilter = "username=" & Listbox1.SelectedValue
ListBox2.datasource = dv
ListBox2.databind
-
Jul 2nd, 2004, 02:12 PM
#3
Thread Starter
Member
thanks
will be trying that out asap
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|