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?
Below is my initialisation code and the add row method.
grd = new dhtmlXGridObject(‘grdPdocs’);
grd.setHeader(“Country Code, Priority Type, PDoc Number, Priority Date, Date Available PDAS”);
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,”);
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:
- User clicks a button on a toolbar
- new modal window is launched with form for data entry
- user completes form clicks save button
- The save button click event handler calling a function on the parent window
- 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.
please provide the complete demo that reproduces the problem or a direct link to the problematic page (you can send it to email@example.com)
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?
yes, the issue was reproduced. We have sent you details and a sample by email.