Friday, March 16, 2012

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.

ThanksI use a DataView to Filter the DataSet Results: Something like:

Dim dv As DataView = New DataView(ds.Tables(0))

dv.RowFilter = "username=" & Listbox1.SelectedValue

ListBox2.datasource = dv
ListBox2.databind
thanks

will be trying that out asap :)

0 comments:

Post a Comment