Having difficulty with addRow

I am having difficulty with addRow on one of my grid rows. It works fine on all my grids except detailsGrid, and it used to work fine on that grid. I get the following error:
TypeError: c is null; can’t access its “_childIndexes” property
For testing, I simplified the use of addRow as much as possible to:
var newId = (new Date()).valueOf();
detailsGrid.addRow(newId,1,0);
However, I still get the same TypeError, when applying this to detailsGrid.
When I apply it to any other grid, for example:
var newId = (new Date()).valueOf();
notesGrid.addRow(newId,1,0);
Then I get the expected new row in the table used by notesGrid, with 1 being the value of the 1st non-primary column.
But it does not work with detailsGrid.
What is wrong? How can I find the error?

second attribute of the addRow method specifies the list of the values for a row:
Please, try to use:

detailsGrid.addRow(newId,"1",0);

or

detailsGrid.addRow(newId,[1],0);