EitanBlumin / CRUDE-ASP

Low Code Application Generator in Classic ASP, with MSSQL Database, Bootstrap, Fontawesome, and jQuery. Based on the AdminLTE web template.
https://git.eitanblumin.com/CRUDE-ASP/
Mozilla Public License 2.0
24 stars 13 forks source link

Utilize the xhr.dt event in DataTables to return additional metadata from server side call #115

Open EitanBlumin opened 5 years ago

EitanBlumin commented 5 years ago

The xhr.dt event in DataTables allows intercepting the Ajax data returned from the server side call.

https://datatables.net/reference/event/xhr

This should let us use additional data returned by the server, such as dataview metadata:

Some metadata types shouldn't be returned on every draw, such as available values for lookup fields (or maybe we do need to return them every time because data might be changed), and dataview metadata, so for that purpose we could utilize the draw parameter and return this metadata only when draw=1.