Dynamically change the select method of a object datasource

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

I have a gridview bound to the select method of an object data source. I
have a filter button, that when clicked applies a filter typed in a textbox.
How do I change the select method of the object datasource and change the
parameter? I need to run a different query when applying the filter. I have
tried rebind the form to a different datatable programatically but I get a
conflict between the datasouce and datasourceid. Regards, Chris.
 
I have a gridview bound to the select method of an object data source. I
have a filter button, that when clicked applies a filter typed in a textbox.
How do I change the select method of the object datasource and change the
parameter? I need to run a different query when applying the filter. I have
tried rebind the form to a different datatable programatically but I get a
conflict between the datasouce and datasourceid. Regards, Chris.

Here you can find a similar example with gridview and dropdown
http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/data/sqldatasource.aspx

Scroll down.
 
Back
Top