Put ID into DataKeyNames and, if I am not mistaken, you will have @ID
parameter available in the datasource UpdateParameters.

Signature
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
> Hi,
>
[quoted text clipped - 24 lines]
> Thanks,
> Bogdan
Bogdan - 05 Mar 2008 14:46 GMT
Thanks, that works. I noticed that GridView _appends_ the ID automatically
to the end of parameter list passed to the UpdateMethod, regardless of the
method's signature and the presence of ID in <UpdateParameters> collection.
What I needed to do for this thing to work was to define my data source
update method as:
Update(field1, field2, ID) . And of course, per your suggestion, I had to
put ID into DataKeyNames (actually the framework did that automatically
because ID is a primary key). I wish that the docs were more helpful in
describing the process more clearly. The only thing that I could find was a
statement simply saying that values in DataKeyNames are passed to the data
source control. I could not find anything about the order, etc. If you
happen to know any useful link that explains the process then I'd really
appreciate it.
Thanks again for your help,
Bogdan
> Put ID into DataKeyNames and, if I am not mistaken, you will have @ID
> parameter available in the datasource UpdateParameters.
[quoted text clipped - 27 lines]
>> Thanks,
>> Bogdan