free-jqgrid / jqGrid

jQuery grid plugin
https://github.com/free-jqgrid/jqGrid
Other
478 stars 196 forks source link

Zeroes in JSON subgrid do not show up #482

Open kaixiong opened 4 years ago

kaixiong commented 4 years ago

Hi,

I am currently using version 4.15.5 and populating subgrids via JSON requests. There is a bug where fields with zero as value show up blank.

json-subgrid-bug

The problem lies in fillJsonBody() in jquery.jqgrid.src.js:18711. The problematic lines are:

subGridCell($tr, cur[j] || " ", j);

and:

subGridCell($tr, jgrid.getAccessor(cur, f[j]) || " ", j);

The issue also occurs when the value is false.