Updating Rows with LinqDataSource

Ok this seems to be something i keep forgetting when setting up a Gridview with LinqDataSource, see the post at the below URL , it pretty much sums up my experience as well:

http://instantdevelopment.blogspot.com/2008/05/linqdatasource-error-on-u...

In short,

Remember to set the DataKeyNames property of the GridView control & ensure you have actually set the primary key to the correct field in the database and App_Code/xxxxx/xxx.dbml tab (file) in the IDE.

apparently this error crops up while inserting as well, no surprise really :-)

Rob.

Stickam

Syndicate content