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
1414
XML Out-Of-Band UpdateRow - what to do with invalid data
posted

Help,

I am using a grid with the LoadOnDemand property set to XML.  It runs like a champ.

However, if the customer enters an invalid Serial Number while issuing an item I cannot generate an alert box.  I can update a column(s) on the grid, but the customer can then blow through since the interface doesn't stop processing.  And, the processing is done at a distance using a BarCode scanner - so blowing through to the next row can be a problem.

Is there a technique I can use in the code behind to inform the CSOM that the UpdateRow was cancelled?  I did set the e.Cancel property to true, but the AfterXmlHttpResponseProcessed still had the _grid.Cancel property set to false.  And, the row had already changed to the next row.  Maybe the _grid.Cancel is false because it is on a fresh record that hasn't been updated.  Is there a client side event that can capture the status of the server side UpdateRow so I can present an 'alert' box and avoid moving to the next row?

  • 130
    posted

    Hi Roger,

    i guess my problem (http://forums.infragistics.com/forums/t/20039.aspx) is related to yours: The user enters data in the grid. the server side UpdateCell event fires and the event handler causes an exception (set e.cancel = true) while updating the database. Result: the database still has the old data but the user does not have a clue because the grid displays the users input.

     So I would appreciate if you could share the solution you found... if there is any ;)

     Thanks,

    paologios

  • 28464
    posted

    Hello Roger,

    This is a very interesting and complex case, thanks for sharing in forums. I have started working on reproducing something similar to what you have, but it will certainly take time. Do you have any progress on this issue?

    I was thinking something along the lines of hooking a Before XmlHttpResponse  client-side event and calling synchronously a method or web-service on the server that would verify the data entered. Meanwhile, since this is a syncrhnous call, we can probably display a "loading..." message so that user knows what is going on. In the case of failing, we would just cancel the before event.