GirdView - Edit resets the SelectCommand

H

Hanno

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
 

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,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top