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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Binding more than one function to an event

Thread ID:





122118 Feb 17,2016 08:58 AM UTC Feb 18,2016 09:55 AM UTC JavaScript 1
Tags: ejGrid
Greg Gannicott
Asked On February 17, 2016 08:58 AM UTC


Is it possible to bind more than one function to an event, at different points in the code.

For example, in one part of the code I would have:

grid.option({ rowSelected: doSomething1 });

Then in another part of the code I would have:

grid.option({ rowSelected: doSomething2 });

And then when the row is selected, both functions trigger.

Using the above style I'm finding that only one is triggering. Is there a way to make both trigger?


Prasanna Kumar Viswanathan [Syncfusion]
Replied On February 18, 2016 09:55 AM UTC

Hi Greg,

Thanks for contacting Syncfusion support.

Yes, we can trigger both the events using jQuery on method, which triggers more than one function on event. In this event, the name should be Plugin + eventName, for example: ejGrid + rowSelected.

Please find the code example and sample:

                dataSource: window.gridData,
                allowPaging: true,
                columns: [
      $("#Grid").on("ejGridrowSelected", function(e){alert(1)});
      $("#Grid").on("ejGridrowSelected", function(e){alert(2)});

Sample : http://jsplayground.syncfusion.com/30i4sux5

Prasanna Kumar N.S.V


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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