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

Extend or override controls

Thread ID:





115957 Mar 5,2014 11:11 AM UTC Mar 6,2014 04:43 PM UTC JavaScript 1
Tags: General
Asked On March 5, 2014 11:11 AM UTC


Is there any way to extend or override ej controls?



Harikrishnan P [Syncfusion]
Replied On March 6, 2014 04:43 PM UTC

Hi Lucia,                                                        

Thanks for your interest in Syncfusion product.

Yes, it is possible to extend our JS controls. To extend or overwrite the functionalities of JS controls, use the prototype object, by which you can create custom methods and properties. Consider a scenario, you want the autocomplete widget to display the suggestions only when you press the backspace key. This can be achieved by the following code snippet.

    // Define this method before Autocomplete initialization

            var click = ej.Autocomplete.prototype._OnKeyUp;

            ej.Autocomplete.prototype._OnKeyUp = function (e) {

                if (e.keyCode == 8) {

    // {handle the custom event or method here}

    // if you want the original method to be executed call the Autocomplete original method

                    click.call(this, e);



Similarly it is possible to create or extend the events and methods of JS controls.





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