Switching Fill methods

  • Thread starter Thread starter Lucas Genea
  • Start date Start date
L

Lucas Genea

Hello,
I have a question: I have 2 dropdownlists and I'd like to cascade them. In
the begining they show 2 different columns of the same table. Once one of
them is picked I'd like to restrict the values of the other one to the
selected value of the first. I created(using the ) 2 tableadapters using the
wizards. I have 2 fill/getdata methods, based on 2 selects, the first without
a where clause, the second with a where clause with a parameter. I created 2
objectdatasources and I bound them to the adapters(I also have coresponding
BLL classes). The form showd the dropdonw properly the first time. Now the
problem: How can I switch the second dropdown to the second Fill method(The
one with parameter) passing DropDownList1.SelectedValue? Any help is really
appreciated.
 
Another way to put the question would be: How can I get a handle (in the
selectedindexchanged event) of the datasets and/or tableadapters I created
with the dataset wizard? If I can then it would be just a matter of invoking
the second Fill method with params and do some databinding. Obviously the
Objectdatasource component knows how to do it at run time. I hope it's not
using reflection
 
Back
Top