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
570
Unable to update record
posted

Good day

 

I'm using a xamDataGrid to update and add a few records.  I'm using a ObjectDataProvider that calls a function in a bll.  I have RecordAdding, RecordUpdating and RecordUpdated events to handle my own updating a business rules and so on. 

For some reason when creating a new record it goes into the Adding event when you enter the data for the first time, then when all the data is entered, and you want to commit the record, it goes into the Updating event, and when it leaves it, it gives me an "Unable to update record" error, which does not tell me much...  It does not even go into the Updated event, where I update my record myself in my own bll.

 

How can I get past this error?  I want to handle these errors myself.

 

Kind regards

Christo

Parents
  • 69686
    posted

    Hello Christo,

    The RecordAdding event fires when a new object is created. This object is created right after you type the first character in any of the add record cells (the parameterless constructor is called). This record, however is not committed. The RecordUpdated event does not fire, because it is supposed to fire after the record has been updated correctly. In your case, you are getting an error and the update is cancelled.

     

    Can you please give us more information on why the record cannot be updated?

Reply Children
No Data