4 Answers, 1 is accepted
0
Hello Hosney,
I am afraid it is difficult to figure out your exact scenario by the provided information so far. Could you please elaborate on what you want to achieve?
Generally, you could use the OnItemUpdated server event of RadGrid to check whether the update has been successfully performed as demonstrated in the following demo:
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx
I hope this will prove helpful.
All the best,
Eyup
the Telerik team
I am afraid it is difficult to figure out your exact scenario by the provided information so far. Could you please elaborate on what you want to achieve?
Generally, you could use the OnItemUpdated server event of RadGrid to check whether the update has been successfully performed as demonstrated in the following demo:
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx
I hope this will prove helpful.
All the best,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0

Hosney
Top achievements
Rank 1
answered on 07 Sep 2012, 06:20 AM
I'm calling the following function from the client:
Then I capture the OnUpdateCommand event on the server to perform the update. Here I do some validations and if the data is invalid i cancel the event by setting e.Canceled = true; (where e is the GridCommandEventArgs parameter)
What I'd like to know is if there is a method called back on the client after this where I can check if the UpdateCommand was cancelled.
I'm doing something similar to what can be found here:
http://mono.telerik.com/Grid/Examples/DataEditing/EditOnDblClick/DefaultCS.aspx
Only difference being that I do the saving manually inside the UpdateCommand event, and cancel the event based on the validity of the record. But cancelled or not the
masterTableView.updateItem(editIndex);
Then I capture the OnUpdateCommand event on the server to perform the update. Here I do some validations and if the data is invalid i cancel the event by setting e.Canceled = true; (where e is the GridCommandEventArgs parameter)
What I'd like to know is if there is a method called back on the client after this where I can check if the UpdateCommand was cancelled.
I'm doing something similar to what can be found here:
http://mono.telerik.com/Grid/Examples/DataEditing/EditOnDblClick/DefaultCS.aspx
Only difference being that I do the saving manually inside the UpdateCommand event, and cancel the event based on the validity of the record. But cancelled or not the
editedRow
variable will be set to null and the next row click will not fire the updateItem function.0
Accepted
Hi Mohamed,
I am afraid there is no a direct callback function when you cancel the update operation. Instead, you could fire a JavaScript function when you use e.Cancel= true or OnItemUpdated, which is being fired if the actual update has been performed:
I hope this helps.
All the best,
Eyup
the Telerik team
I am afraid there is no a direct callback function when you cancel the update operation. Instead, you could fire a JavaScript function when you use e.Cancel= true or OnItemUpdated, which is being fired if the actual update has been performed:
ScriptManager.RegisterStartupScript(Page,
typeof
(Page),
"myScript"
,
"functionName()"
,
true
);
I hope this helps.
All the best,
Eyup
the Telerik team
0

Hosney
Top achievements
Rank 1
answered on 12 Sep 2012, 07:00 AM
I thought so. That's not so hard anyway. Thanks!