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. Image for the cookie policy date

Cannot bind actionBegin

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

When trying with the following JS:
            function actionBegin(args) {
                    function() {
                        var urla = ej.DataManager({
                            url: $(this).data("url"),
                                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?

3 Replies

RU Ragavee U S Syncfusion Team 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. 

Ragavee U S. 

WO Wouter May 4, 2016 09:24 AM UTC

That works! Thanks.

RU Ragavee U S Syncfusion Team May 5, 2016 05:50 AM UTC

Hi Wouter, 


Thanks for your update. 


We are happy that your requirement is achieved. 



Ragavee U S. 

SIGN IN To post a reply.
Live Chat Icon For mobile
Up arrow icon