I’m using a connector to retrieve data from a database. The data is sorted in the connector sql code.
When I add a new row to the grid I want to reload the data so my new row is correctly located in the grid.
I’m running the following commands:
myGrid.addRow(… all my data…);
The data is saved in the database correctly but I’m getting an error from the dhtmlx code:
Unable to set value of the property ‘idd’: object is null or undefined
I tried the updateFromXML method but it just adds my new row to the bottom of the grid (not what I want!)
I also tried the clearAndLoad method but this throws the same error as above.
What is the solution?
Unfortunately your issue is not clear.
How do you save grid’s data to database.
Please, provide a more detailed sample of the code.
I use a dhtmlxConnectors connector attached to the grid with a dataprocessor:
myGridProcessor = new dataProcessor("Connectors/myConnector.ashx");
I use the dataprocessor to populate the grid:
Updates to the grid (edits/addRow) are handled by the data processor.
After an addRow I want to reload the grid or the updates but with my ordering (as specified in the sql in the connector).
Adding a row then re-loading throws an error as described in my previous post.
Unfortunately such scenario is not working because after the grid added a row dataprocessor should update this data on server but before it finixh the operation you are already cleared the grid.
Please, try to use timeout or call the clear/load from the onAfterUpdateFinish event.