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.
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
I am glad that you find Martin’s answer helpful and have been able to achieve your requirement according to his suggestion.
Feel free to contact me if you have any additional questions regarding this matter.