We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Cannot bind actionBegin

Thread ID:

Created:

Updated:

Platform:

Replies:

123962 May 3,2016 02:47 PM UTC May 5,2016 05:50 AM UTC JavaScript 3
loading
Tags: ejGrid
Wouter
Asked On May 3, 2016 02:47 PM UTC

I tried all the examples, but the event never fires.

When trying with the following JS:
            function actionBegin(args) {
                console.log(args);
            }
            $(".editableGrid")
                .each(
                    function() {
                        var urla = ej.DataManager({
                            url: $(this).data("url"),
                            adaptor:
                                new ej.UrlAdaptor(),
                            crudUrl: $(this).data("crud"),
                            removeUrl: $(this).data("delete"),
                            offline: false
                        });
                       
                        var grid = $(this).children(":first");
                        grid.ejGrid("dataSource", urla);  //Works fine
                        grid.ejGrid("actionBegin", actionBegin); //Throws error
                    });
I get an error:

Error: ej.Grid: function/property - actionBegin does not exist
    at t.throwError (http://localhost:65055/Scripts/web/ej.web.all.min.js:10:24489)
    at n.fn.(anonymous function) [as ejGrid] (http://localhost:65055/Scripts/web/ej.web.all.min.js:10:19088)
    at HTMLDivElement.<anonymous> (http://localhost:65055/Scripts/Site.js:720:30)


How can I use my eventhandler?


Ragavee U S [Syncfusion]
Replied On May 4, 2016 07:32 AM UTC

Hi Wouter, 

Thanks for contacting Syncfusion support. 

We analyzed the code examples that you have shared and found that you have defined the actionBegin event as direct property in Grid so the reported error has been obtained. 

So we suggest you to define the actionBegin as in the below code example. 

$(".e-grid").ejGrid("model.actionBegin", "actionBegin"); //the client side events are defined within the grid model. 

Please try the above solution and get back if you still face any difficulties. 

Regards, 
Ragavee U S. 


Wouter
Replied On May 4, 2016 09:24 AM UTC

That works! Thanks.

Ragavee U S [Syncfusion]
Replied On May 5, 2016 05:50 AM UTC

Hi Wouter, 

  

Thanks for your update. 

  

We are happy that your requirement is achieved. 

  

Regards, 

Ragavee U S. 

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;