Additional data to form, grid, etc. with every proccessing

How to send additional data with every operation with grid, form etc.?

For example i start filtering, sorting, crud (insert/update/delete) operations, paging, etc. for all of this operations i need to know choosen localization id, choosen tables which i want to join.

PHP need to know this additional data of view.

Grid has method setUserData which is abble to add data to whole grid

docs.dhtmlx.com/api__dhtmlxgrid_setuserdata.html

and this data as i see, is sent as a userdata to crud operations, but what in case of grid, or sorting operations?

how to add any data?