I have an igCombo that has a button in the header template. The button has an "onclick='handleClick(this)'" specified. How can I get a reference to the igCombo instance inside of the "handleClick()" function without using an id of the igCombo?
function igComboHeaderSelectAllHandler(e) { // use "e" to get a relative reference to the igCombo instance } // igCombo options { dataSource: igComboDataSource, textKey: "Name", valueKey: "Name", allowCustomValue: false, autoComplete: true, enableClearButton: false, itemTemplate: "<span title=\"${Name}\"\>${Name}</span>", headerTemplate: "<div><input type='button' value='Select All' onclick='igComboHeaderSelectAllHandler(this)' /></div>", multiSelection: { enabled: true, showCheckboxes: true, itemSeparator: ',' }
Hi,
In this context "this" is the input html element itself, so you will not be able to pass a reference to the combo without using a selector. Please let me know if you have further questions.
Hristo