Dynamically change the select method of a object datasource

Discussion in 'ASP .Net' started by Chris, May 10, 2007.

  1. Chris

    Chris 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.
    Chris, May 10, 2007
    #1
    1. Advertising

  2. On May 10, 10:50 pm, "Chris" <> wrote:
    > 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.
    Alexey Smirnov, May 10, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. gane kol
    Replies:
    0
    Views:
    382
    gane kol
    Mar 22, 2005
  2. K B
    Replies:
    1
    Views:
    8,955
    PeterKellner
    Jun 8, 2006
  3. palmiere
    Replies:
    1
    Views:
    312
    Erwin Moller
    Feb 9, 2004
  4. Bonge Boo!
    Replies:
    5
    Views:
    178
    Bonge Boo!
    Apr 25, 2005
  5. juglesh
    Replies:
    7
    Views:
    163
    Thomas 'PointedEars' Lahn
    May 8, 2005
Loading...

Share This Page