Send message when table header is clicked

So I have a table that shows users order information. Depending on what department they are in they might have thousands of orders open at one time which really slows down the tables function. I have filters that can be applied to the data and was handling that on the front end but it was very slow with large sets of data. I've since changed the way those filters work to where they run on the database and deliver the information prefiltered to the users. I also only send them 100 rows at a time and set up custom pagination to pull the next 100 rows from the database when they click the next page. This is all working great but one of my users brought up a good point about sorting that I didn't think about. When they use the built in sort function on the tables headers it only sorts the 100 rows loaded in. I'm looking to send a message to the page when someone clicks the column header so I know they want to filter that column and then have the database handle that like I do with the filters but I don't know how to send a message when they click the table headers.

Any help would be greatly appreciated!

Setting virtualized : true and either : true or pager.bottom : true should give your desired functionality automatically.

i.e., Let the query return all the data but let the Ignition gateway sort out the filtering, pagination and sorting of the data.

Well the problem with that is I'm using some javascript to allow drag and drop from one table to another. This has to pull a row out of an array of 7,000 records and put it in to another array and shuffle them around so it shows in the section of the table it was dragged to since I allow the users to custom order their tables. This slows things down when all of the records are loaded at once. That is why I moved to pushing the filtering to the DB.