Dynamically Populating a Gridview

Discussion in 'ASP .Net' started by Isoaxis@gmail.com, Mar 1, 2006.

  1. Guest

    On the page in question I have a gridview that displays the list of all
    products in the Products table of the DB. That gridview is bound with a
    sqldatasource using Visual Studio's "wizards". The gridview is paged at
    10 rows. Anticipating the client entering in many, many products, I
    want to allow the products to be filtered by a dropdownlist just above
    the gridview containing categories/category ID's.

    I have tried mulitple methods for "repopulating" the gridview including
    calling the filtering stored proc in the codebehind and building a
    datatable to bind with; and dynamically assigning another datasourceID
    to the gridview (for this approach I added another sqldatasource to the
    page using the "wizard" that utilized the proper "filtering" stored
    procedure. The sqldatasource works properly.), but nothing seems to
    work. The last approach doesn't give an error, but also does not filter
    correctly.

    Any ideas?


    thanks,
    ..brit
    , Mar 1, 2006
    #1
    1. Advertising

  2. Hi Isoaxis

    Hop following URL is helpful to you:

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/GridViewEx04.asp

    Elton Wng

    "" wrote:

    > On the page in question I have a gridview that displays the list of all
    > products in the Products table of the DB. That gridview is bound with a
    > sqldatasource using Visual Studio's "wizards". The gridview is paged at
    > 10 rows. Anticipating the client entering in many, many products, I
    > want to allow the products to be filtered by a dropdownlist just above
    > the gridview containing categories/category ID's.
    >
    > I have tried mulitple methods for "repopulating" the gridview including
    > calling the filtering stored proc in the codebehind and building a
    > datatable to bind with; and dynamically assigning another datasourceID
    > to the gridview (for this approach I added another sqldatasource to the
    > page using the "wizard" that utilized the proper "filtering" stored
    > procedure. The sqldatasource works properly.), but nothing seems to
    > work. The last approach doesn't give an error, but also does not filter
    > correctly.
    >
    > Any ideas?
    >
    >
    > thanks,
    > ..brit
    >
    >
    =?Utf-8?B?RWx0b24gVw==?=, Mar 1, 2006
    #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. Gibs
    Replies:
    1
    Views:
    329
  2. ben
    Replies:
    2
    Views:
    623
    Ben Arthur
    Mar 4, 2004
  3. Wim
    Replies:
    1
    Views:
    426
  4. netasp
    Replies:
    9
    Views:
    792
    Steven Cheng[MSFT]
    Sep 6, 2006
  5. Ian Davies
    Replies:
    2
    Views:
    428
    bostonmark
    Oct 2, 2008
Loading...

Share This Page