views:

11

answers:

1

MSDN Library has a walkthrough for bulk updates using a SqlDataSource.

http://msdn.microsoft.com/en-us/library/aa992036(v=VS.90).aspx

Not sure what I'm doing wrong, but I keep getting an error at:

currentID = Convert.ToInt32(GridDocuments.DataKeys(0).Value)

Are there other resources for SqlDataSource bulk updates?

A: 

The line in the example reads:

currentID = Convert.ToInt32(GridView1.DataKeys[r.RowIndex].Value);

This line assumes that you are setting datakeys on your grid, pay special attention to the DataKeyNames attribute in the example: DataKeyNames="EmployeeID"

This example is a little easier to follow. If you would like help debugging the other example please post the error your getting as well.

JonVD