Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
wiki:upgrade_from_3.6.4_to_3.6.5 [2010/06/03 17:16]
tony
wiki:upgrade_from_3.6.4_to_3.6.5 [2010/06/08 18:58]
tony
Line 96: Line 96:
  
 Note that the cell property should not be changed Note that the cell property should not be changed
 +
 +===== loadComplete changes=====
 +As of the documentation to the loadComplete event we pass as parameter the request from the response. In most cases to use the request before version 3.6.5 you will need to use the responseText property. \\
 +After this change the "​response"​ passed to this event is actually the data from the server converted automatically from jQuery according to the datatype parameter. \\ \\
 +By example let suppose that you use json datatype. Before 3.6.5 in order to use the response as object you maybe do the following: \\
 +
 +<code javascript>​
 +jQuery("#​gridid"​).jqGrid({
 +...
 +datatype : "​json",​
 +loadComplete : function (request) {
 +// to convert the request using JSON.parse to JavaScrip object you do maybe this:
 +var myrequest ​ = JSON.parse(request.responseText);​
 +....
 +},
 +...
 +});
 +</​code>​
 +
 +After 3.6.4 you should remove JSON.parse -i.e
 +<code javascript>​
 +jQuery("#​gridid"​).jqGrid({
 +...
 +datatype : "​json",​
 +loadComplete : function (request) {
 +// no need to use JSON.parse:
 +var myrequest ​ = request;
 +....
 +},
 +...
 +});
 +</​code>​
 +

QR Code
QR Code wiki:upgrade_from_3.6.4_to_3.6.5 (generated for current page)