Get Free Trial

trigger event when flat grid table column is sorted or filtered

amir asked on September 30, 2020

i have a flat data table with multiple columns. I want to user to save the table along with the filtering and sorting applied. i.e, user access the table apply some column filtering and sorting and then save the table. The save button is enabled only if user make some changes to table. I can get filtering changes event using reportchange event, but how can i get an event handler when user applies sorting.
I tried aftergriddraw. It triggers an event when the user applied sorting but it is also triggered when the page containing the table is loaded. So i cannot decide if user has made any changes as it is triggered when grid loads for the first time when user has not made any changes

6 answers

Mykhailo Halaida Mykhailo Halaida Flexmonster September 30, 2020

Hi Amir,
Thank you for posting your question.
We’ve managed to reproduce similar reportchange behavior on our side – the event is not triggered when sorting is changed in the flat grid layout.
Our team will take a deeper look at this and provide a fix with our upcoming release ETA Nov 2nd.
Please let us know if there is anything else we can help you with in the meantime.
Best regards,

Mykhailo Halaida Mykhailo Halaida Flexmonster November 3, 2020

Hi Amir,
We are glad to announce that the issue with the reportchange event not being triggered when changing sorting in flat form was fixed.
This is provided in the 2.8.19 version of Flexmonster:
You are welcome to update the component:
Please let us know if there is anything else we can help you with.
Best regards,

Mykhailo Halaida Mykhailo Halaida Flexmonster November 10, 2020

How are you?
Just checking in to ask whether you’ve received our notification regarding the latest Flexmonster version. Has it helped to fix the issue on your side?
We would be happy to hear your feedback.

Albert Ryan Banez December 17, 2020

Hi Amir,
I’m not sure if i have same issue.
But i want to trigger “Save” button when user hits the “Apply” button. apply button shows in difference places like for example user make some changes in the labels or filtering.
How can I trigger Save button?

Illia Yatsyshyn Illia Yatsyshyn Flexmonster December 17, 2020

Hello, Albert,
Thank you for contacting us.
If we understand correctly, you require to save the report every time the configuration is changed (filtering, sorting, adding rows/columns).
We suggest checking out the reportchange event, which is triggered when a report is changed in the component.
Every time this event is triggered, execute the save method (“Save” button handler):

flexmonster.on("reportchange", () => {;

Please let us know if it works for you.
Feel free to contact us in case further questions arise.
Kind regards,

Albert Ryan Banez December 18, 2020

Hi Illia,
It works.
Thank you for the help.

Please login or Register to Submit Answer