you have to do nothing for updating datakeys in the gridview you have to just give the field name to DataKeys which is the attribute of the gridview. when you done add process then just once again bind your grid.
Thanks & Regards
Vipul Donga
Mark it as an answer, if it helped
if (MyAnswer)
MarkAsAnswer();
else
Repsonse.Write("correct me where i am wrong");
Marked as answer by NathiyaR on Dec 29, 2009 08:50 AM
NathiyaR
Member
345 Points
170 Posts
Update DataKeyNames field value in gridview
Dec 29, 2009 05:22 AM|LINK
Hi All,
I am using gridview for add and update process in database.
Process Flow:
Name A B C Command
xx Add
yy 12 13 13 Update
zz 22 33 44 Update
vipuldonga
Contributor
3753 Points
692 Posts
Re: Update DataKeyNames field value in gridview
Dec 29, 2009 05:43 AM|LINK
Hi,
you have to do nothing for updating datakeys in the gridview you have to just give the field name to DataKeys which is the attribute of the gridview. when you done add process then just once again bind your grid.
Vipul Donga
Mark it as an answer, if it helped
if (MyAnswer)
MarkAsAnswer();
else
Repsonse.Write("correct me where i am wrong");
NathiyaR
Member
345 Points
170 Posts
Re: Update DataKeyNames field value in gridview
Dec 29, 2009 05:58 AM|LINK
Thank You.
I got the result. Is it possible to reset the datakey field value.