Starr Duskk
asked on
set_cancel Object doesn't support property or method
eventArgs.set_cancel(true) ;
I have added the set_cancel to my function and get this error when it hits it:
Jscript runtime error: Object doesn't support this property or method
Below is my function. I want to cancel it returning to my telerik grid row click event, but just hitting the method generates the above error:
<script language="JavaScri pt" type=" text/javas cript">
<!--
function GetDirtyGridRowCl ickReviewe r(sender, eventArgs)
{
var sContinue;
if (isDirty == 1) {
sContinue = window .confirm(" You have u nsaved cha nges. Continue?");
if (sContinue != t rue) {
eventArgs.set_ cancel(tru e);
return false; // can cel so the y can save
}
}
isDirty = 0; // reset if continu e
return true;
}
// -->
</script>
I am calling this function on the rowclick of a radgrid, if that helps:
grdGrid.ClientSettings.Cl ientEvents .OnRowClic k = "GetDi rtyGridRow ClickRevie wer"
I have added the set_cancel to my function and get this error when it hits it:
Jscript runtime error: Object doesn't support this property or method
Below is my function. I want to cancel it returning to my telerik grid row click event, but just hitting the method generates the above error:
<script language="JavaScri
<!--
function GetDirtyGridRowCl
{
var sContinue;
if (isDirty == 1) {
sContinue = window
if (sContinue != t
eventArgs.set_
return false;
}
}
isDirty = 0; // reset
return true;
}
// -->
</script>
I am calling this function on the rowclick of a radgrid, if that helps:
grdGrid.ClientSettings.Cl
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I had to go a different route, instead of cancelling the click if they wanted to cancel, I had to activate the click if they wanted to proceed.