Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1910
Send the value of the DataKeyField as a parameter
posted

In my sqlDataSource, I am running some code in the OnDeleting. In this code, I would like to send the value of the DataKeyField as a parameter.

This is the code that I have:

e.Command.Parameters(

 

 

"@Record_ID").Value = ????

???? = The value of the DataKeyField in the grid of the row that I just pressed the delete key for (Selected Row). The field is named "File_ID". I thought if I used something like e.Row.Cells.FromKey("File_ID").Value, it would work...but it doesn't.

Any help is greatly appreciated.