ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: pranit@srcomsec on March 28, 2023, 03:03:38 pm
-
I am trying to add the javascript code below to track "Clear" & "Ok" button click event. The click event is working for "Clear" button but not for "Ok" button. Please advise.
$('body').on('click', '#tabs-filter button', function() {
console.log('Button clicked!');
});
-
try this
document.body.addEventListener('click', function(evt){
if(evt.target.nodeName == "BUTTON" && evt.target.closest("#tabs-filter")){
alert("clicked");
}
}, true);
-
Thank you, the event is working.
We have multiple dynamic Grid on the same screen using Goldenlayout.
I need the Paramquery Grid ID from where the filter popup opens when the user clicks the "Ok" or "Clear" button. Please advise.
-
It doesn't seem feasible the DOM way because header filter menu is not attached to grid DOM.
Please try the documented beforeFilter and filter events. Also beforeFilter event doesn't fire when grid.refreshDataAndView() is called so that can help you differentiate between user initiated filtering and otherwise.
-
Thank you. This event helps us to complete our required changes.