Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1445
Template Closing/Closed Client Side Routines are called twice on edit.
posted

When I am edditng a row on the client side, the closing and closed routines are called twice. When the opened/opening routines are called once.  I am thinking the issue is with my client closing routine because that gets called twice before closed gets called twice. I have no idea what can be the problem. Any thoughts?

Here is how I set it up in the grid...

<

 

 

RowEditingClientEvents TemplateClosed="templateClosed" TemplateClosing="templateClosing" TemplateOpening="templateOpening" TemplateOpened="templateOpened"/>

 

Closing...

 

 

 

 

 

 

 

 

 

 

 

 

 

 

    function templateClosing(sender, e) {               
        var t = sender.get_behaviors().get_editingCore().get_behavior().get_rowEditingTemplate();
        isSaving = e.get_saveChanges();
        debugger
        if (t._okBtn) {
            if (e.get_saveChanges()) {
                if ((Page_Validators != undefined) && (Page_Validators)) {
                    Page_ClientValidate('templateValidation');
                }

                if (!Page_IsValid) {
                    e._cancel = true;
                    return false;
                } else {
                   // SetValidatiorsForTempalteClosing();
                }
            }
            else {
               // SetValidatiorsForTempalteClosing();
            }
        }       
    }