dependent dropdownlists

M

mcnews

i need an example of how to populate a top listbox via stored proc
that once an item is selected two other listboxes are populated from
stored procs. when the 2nd listbox item is selected the 3rd is
updated from stored proc.
tia,
mcnewsxp
 
C

Cor

There is nothing different if you do it using a stored procedure or a
dynamic procedure.

If you use a datatable than this is all you need to do.

dim dt as new datatable
using da as new SQLDataAdapter("YourSPName",TheConnectionString)
da.SelectCommand.commandType = command.SP
da.Fill(dt)
end using
YourListBox.DataSource = dt
YourListBox.DisplayMember = "YourDisplayColumn"
YourListBox.ValueMember = "YourValueColumn"

Normally is the SelectedValue then the where parameter for the next SP



"mcnews" wrote in message

i need an example of how to populate a top listbox via stored proc
that once an item is selected two other listboxes are populated from
stored procs. when the 2nd listbox item is selected the 3rd is
updated from stored proc.
tia,
mcnewsxp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top