Author Topic: Crash when groupModel column has value of ''  (Read 2600 times)

Rick W

  • Newbie
  • *
  • Posts: 1
    • View Profile
Crash when groupModel column has value of ''
« on: April 27, 2016, 01:15:43 pm »
Pqgrid 2.0.4 does not work well if the value of a column listed in groupModel: contains an empty string.

I have a grid with a single column (dataIndx:) listed in groupModel:.  In some records, that column can be an empty string.  The data comes from a postgresql database via ajax.  Firebug tells me that a 'TypeError: cols[\u][dataIndx] is undefined' is encountered in line 8196 of pqgrid.dev.js, and no rows are displayed.  (Note \u above is actually just u in the error message, but that triggers underline in the forum software.)

If there is more than one column, and a blank value is encountered in a grouped column,  the numberCell: for the blank group is nan, the group title: is not displayed, and there is no way to collapse/expand the group.

I am able to work around this problem by replacing empty values with '-- none --' in the php program providing the ajax data.

I would prefer that pqgrid handle an empty group value just like any other value.  Most important, please do something about the crash when there is only one grouped column and an empty group value is encountered.