GirdView - Edit resets the SelectCommand

Discussion in 'ASP .Net' started by Hanno, Aug 7, 2006.

  1. Hanno

    Hanno Guest

    Hi, I have an AccessDataSource connected to a GridView that shows all
    customers in a table. In the Page_Load event I check for any QueryStrings
    being passed and change the AccessDataSource.SelectCommand so that it
    becomes a "Select * From Customers where [ID] = 123". This works and I can
    see only one customer in the GridView. But if I click on the "Edit" link,
    which is a CommandField, it resets the GridView, showing all Customers and
    places the first customer in edit mode.

    I cannot see where I can control the Edit link, to stop it resetting the
    query. Has anyone faced the same problem and overcome it?

    Many thanks
    Hanno
    Hanno, Aug 7, 2006
    #1
    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. Shenc
    Replies:
    3
    Views:
    14,532
    ivanxie
    Dec 21, 2012
  2. =?Utf-8?B?TGFycnkgR3JhZHk=?=

    Complex GirdView Problem, returning values from dynamic TemplateFi

    =?Utf-8?B?TGFycnkgR3JhZHk=?=, Sep 9, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    2,243
    S. Justin Gengo
    Sep 9, 2005
  3. Ashton

    GirdView not sorting after change

    Ashton, Jan 21, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    396
    Alvin Bruney [MVP]
    Jan 23, 2007
  4. bthornton84
    Replies:
    1
    Views:
    2,075
    bthornton84
    Oct 23, 2008
  5. VictorReinhart

    GirdView Validation

    VictorReinhart, Dec 19, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    148
    VictorReinhart
    Dec 19, 2005
Loading...

Share This Page