You can do it as follows:
1- Add OldValuesParameterFormatString="{0}_Key" to gridview
2- Change the parameter in the ods section to: <asp:Parameter Name="customerid_Key" Type="Int32" />
3- change the parameter name in the delete method to int customerid_Key .
I hope this answer helps you. (I can not add a comment because of my reputation, then I added an answer!)
Alex
source share