Hello Abu,
in these days I have migrated my application from phpgrid 2.2 to phpgrid 2.6 and and I noticed that some pages did not load with the 2.6 version
After a bit of testing I found that the problem are the columns with an option like this:
$col[“formatter”] = “function(cellval,options,rowdata){return rowdata.field001.replace(‘abc’,’123′)}”;
If the field field001 contains a NULL value, the grid doesn’t load (the grid freezes with Loading…) and in Firefox web console I get the error ‘TypeError: rowdata.field001 is null’
If I remove the replace method:
$col[“formatter”] = “function(cellval,options,rowdata){return rowdata.field001}”;
the grid load but show the value null in the column which is not pleasant to see (in phpgrid 2.2 is blank). Besides, I need to use the replace method to manipulate the output.
So there must be a difference on how the NULL value is treated betwheen phpgrid 2.2 and 2.6
I know thare there are workarounds, both in mysql and javascript, to handle NULL values, but I should change a lot of pages with this problem.
Please let me know if you can address this in your code.
Thanks!
We used latest JQGrid v4.7 JS opensource component in version 2.6 which may have some changes.
One solution is to replace following file from 2.2 to your current implementation and see if it work.
lib/js/jqgrid/js/jquery.jqGrid.min.js
We’ve done another fix in core lib to make null to “”. Emailed you update.