On line 693 of version 3.2.3 of grid.base.js before the switch statement in the populate function add the following line.
if (typeof ts.p.datatype == 'function') {ts.p.datatype(gdata);}
This will allow a function to be called as the datatype. I currently use a json-rpc wrapper for my server side php code, which mimics my PHP classes. This takes care of all my json-rpc and jsonp-rpc calls. The current datatypes are limiting.
Datatype functions should call addJSONData addXMLData respectively when they have aquired their data. For examples of their use see the populate function stating on line 688 of version 3.2.3 of grid.base.js.
Datatype functions are supplied with a single object containig the request information, which normally would have been transformed into GET or POST arguments. This object is compatible with the data: option supplied to the jQuery $.ajax function. Again, look to the populate function for an example of it's use.
This is a feature, which is easy to add and use, and helpful if your data is supplied by other jQuery plugins, as mine is.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top