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
55
IgGrid - How to connect custom feature chooser to the grid?
posted

In my project I use igGrid from ignite-ui. In headers of columns there are gears. If user clicks gear then a popover apears (feature chooser). My task is to implement custom feature chooser - when user clicks on the gear then my custom feature chooser should apear instead of the built-in feature chooser.

I know how to implement the custom feature chooser and options like sorting, grouping, column moving etc. The problem is that I can't find out how to overwrite the gear click event.

Parents
  • 200
    Verified Answer
    Offline posted

    Hello Jerzy,

    Overwriting the default click event of the gear icon can be achieved as following:

    $('*[id*=grid_featureChooser]:visible').unbind("mousedown").on('mousedown', () => {

        alert('gear button pressed');

     });

    Basically, what I am doing is unbinding from the original click event of the gear icon element and binding another one. Attached you will find a working sample illustrating my suggestion for your reference.

    Please keep in mind that by design we do not provide templating for the Feature Chooser out of the box.  Using any feature chooser different than the one that is build-in  will require custom handling which might go beyond the scope of our developer support.

    Please let me know if you need any further information.

    customPopover.zip

Reply Children
No Data