Click here to Skip to main content
15,909,205 members

Comments by Member 10327058 (Top 2 by date)

Member 10327058 7-Nov-13 0:07am View    
This is what i get. im confused little bit ..
Member 10327058 7-Nov-13 0:05am View    
[MissingRecordException]: Requested record cannot be found by key

Common Causes:

-The data key field(s) is being edited causing the record not to be found when trying to update

-Not rebinding the grid when there are updates to be commited (assuming DataViewState is disabled in this case)
-for instance if the grid is bound on !IsPostback

-While a user is editig a particular row in the grid, another user deletes the record from the database. On posting back, the grid is rebound tot the updated datasource which no longer contains the record, resulting the exception

-Changing completely or filtering the grid's datasource before all CRUD operations are carried out - this is quite common when using other controls on the page to do this. This is partly due to the fact that control events such as SelectIndexChanged for a dropdownlist or click for button fire before the update events.Changing the grid's source should in such cases by delayed for later