Link to home
Start Free TrialLog in
Avatar of Starr Duskk
Starr DuskkFlag for United States of America

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="JavaScript" type="text/javascript">  
<!--  
function GetDirtyGridRowClickReviewer(sender, eventArgs)  
{  
    var sContinue;  
    if (isDirty == 1) {  
        sContinue = window.confirm("You have unsaved changes. Continue?");  
        if (sContinue != true) {  
            eventArgs.set_cancel(true);  
            return false;     // cancel so they can save  
            }  
        }  
    isDirty = 0; // reset if continue  
    return true;  
}  
// --> 
</script> 

I am calling this function on the rowclick of a radgrid, if that helps:
 grdGrid.ClientSettings.ClientEvents.OnRowClick = "GetDirtyGridRowClickReviewer" 

ASKER CERTIFIED SOLUTION
Avatar of Kumaraswamy R
Kumaraswamy R
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Starr Duskk

ASKER

I checked with Telerik, and the set_cancel is no longer supported in their current versions.
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.