jqGrid Highlight error cell when validation fails

509 views Asked by At

I am using jqgrid 4.6. I tried implementing the code give in the link below to highlight error cell. But I get error 'Unable to get property 'rows' of undefined or null reference'. Can you please help me resolve it. Thanks!

Link:Oleg's answer in Stackoverflow Link

1

There are 1 answers

0
Jia On

I know it is a bit late but here it is:

using version 4.6 this bit of code:

$.jgrid.checkValues = function(val, valref, g, customobject, nam) 

This is no longer working, somehow the g is undefined.

You'll need to change this line of code: (in Oleg's answer)

From:

 if (!ret[0]) {

   tr = g.rows.namedItem(editingRowId);

to:

if (!ret[0]) {

  tr = grid[0].rows.namedItem(editingRowId); //line 95 of original code

This should work.