gridview datakeys empty when sqldatasource is used

N

Narshe

I have a gridview with datakeyname="Id" that is using a sqldatasource.
When I click delete on the gridview, the datakeys property is empty
during the deleting event.
 
J

Jan Hyde

I have a gridview with datakeyname="Id" that is using a sqldatasource.
When I click delete on the gridview, the datakeys property is empty
during the deleting event.

Post the code you are using to retrieve the datakeyname



Jan Hyde (VB MVP)
 
N

Narshe

e.DataKeys.Count is 0 and GridView.DataKeys.Count is also 0

Normally I could do GridView.DataKeys[Convert.ToInt32( e.RowId )].Value
to get it, but the keys are null.

-Josh
 

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

Staff online

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top