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();
            }
        }       
    }

Parents
  • 49378
    posted

    Hi apalcer,

    I have studied your code and there seem to be no issues with it. If the Closing/Closed events are raised twice can you check if some other part of your implementation is trying to close the template (e.g. Page_ClientValidate) ?

    Let me just point out that there is a method set_cancel() in the event argument which should be used to cancel events.

    Please contact me if you need further assistance.

    Best Regards,

    Petar Ivanov
    Developer Support Engineer
    Infragistics, Inc.
    http://ko.infragistics.com/support

Reply Children
No Data