Addrow cases an error

Hi support,



I have a strange one. I have a grid initialised and add a row programatically.



I get the error “cell is null or not an object” on “a.cell.wasChanged=true})” bit of code.



the strange thing is, if I dont debug the code, the new row is displayed in the grid?



Any ideas?



Below is my initialisation code and the add row method.



Cheers



Scott



grd = new dhtmlXGridObject(‘grdPdocs’);

grd.setSkin(‘light’);

grd.setImagePath("…/…/imgs/");

grd.setHeader(“Country Code, Priority Type, PDoc Number, Priority Date, Date Available PDAS”);

grd.setInitWidths(“100,100,200,130,130”)

grd.setColAlign(“left,left,left,left, left”)

grd.setColTypes(“ro”);

grd.enableMultiselect(true)

grd.enableRowsHover(true,‘test’);

grd.init();

grd.addRow(1,“scott,thomas,is, going, home,”);

First parameter in addRow() method is id of a new row. So addRow() methos should looks like that:
grd.addRow(“1”,“scott,thomas,is, going, home,”);
Please check example at the attachment

sample_addRow_first.zip (80.8 KB)


I am using a variable that is a string and it still happens:



var obj = “pd4589”



grd.addRow(obj,“scott,thomas,is, going, home,”);



Cheers



 



Scott


Hello,


there shouldn’t be spaces in the “initialization” methods. Please, delete unnecessary space in the setColAlign method - and issue will be fixed.


The error still happens.



The process goes as follows:

  1. User clicks a button on a toolbar
  2. new modal window is launched with form for data entry
  3. user completes form clicks save button
  4. The save button click event handler calling a function on the parent window
  5. The parent window function adds the new row and closes the modal window

The add new row seems to work as you can see the newly added row but it still errors with the message:


'cell' is null or not an object line 1115


I am using the single js file for the whole suite.


 


Cheers


 


Scott


Hello,


please provide the complete demo that reproduces the problem or a direct link to the problematic page (you can send it to support@dhtmlx.com)

Hi Alex,

I was away on monday bt have since replied to the email you sent inregards with the toolbar not showing in the sample i provided.

Are you now able to recreate the problem your end?

Cheers

Scott


Hello,


yes, the issue was reproduced. We have sent you details and a sample by email.