I have an UltraWebGrid implemented with ajax updates and deletions working just fine. The issue comes when the deletion/update occurs on the server, and due to constraints decides not to perform the deletion/update. What I need to be able to do is cancel the client side deletion/update of the row and display a message to the user. I am currently trying to hook into the XmlHTTPResponseHandler and AfterXmlHttpResponseProcessed events to try to cancel the deletion.
Is there a way to do this? The gridResponse parameter on the XmlHTTPResponseHandler has a property Cancel - that is always False. It I force this to True - the deletion does not happen - but I have no way to determine if the cancel needs to take place based on input from the server. Any ideas?
Thanks
Chad
Hi!
Did you find a solution to this problem? I was wondering about the same thing and your post came up when I searched the web.
This is how I solved my problem.
In code behind:
Try 'Delete operation...Catch ex As Exception gridClaim.ClientResponse.Tag = XmlHTTPRequestType.DeleteRow gridClaim.ClientResponse.ResponseStatus = XmlHTTPResponseStatus.FailEnd Try
In aspx file:
function gridClaim_XmlHTTPResponseHandler(gridName, rowId, xmlResponceObject){ if (xmlResponceObject.ReqType == igtbl_reqType.DeleteRow && xmlResponceObject.ResponseStatus != 0) { xmlResponceObject.Cancel = true; }}