Dynamically change the select method of a object datasource

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.
 
G

Guest

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.
 

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

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top