Posted 12 Aug 2016 Link to this post
Hello.
I have the Radgrid using a template edit form. How to cancel the on-going update, if the certain control doesn't have the appropriate value? I can reference the certain control in the template edit form and read it's new value (from within the "OnItemUpdated" event), but I don't know how to cancel the on-going update? On the update button I'am using CommandName="Update" Please advise.
Regards, E.
Posted 17 Aug 2016 Link to this post
protected
void
RadGrid1_ItemCommand(
object
sender, GridCommandEventArgs e)
{
if
(e.CommandName == RadGrid.EditCommandName) {
GridDataItem item = (GridDataItem)e.Item;
//Your switch case goes here
//Example condition with if
(item(
"MyItem"
).Text ==
"Some Value"
) {
e.Canceled =
true
;
}
Posted 20 Aug 2016 in reply to Maria Ilieva Link to this post
Hello Maria.
Thank you for your reply. But I need to cancel the allready "on-going" edit process on the "OK" submit button, which means that the update must be interrupted, if the updated value in the certain field wouldn't meet the requirements. Any suggestions?
Regards,
Erik
Posted 24 Aug 2016 Link to this post