Unfortunately the issue cannot be reproduced locally.
If issue still occurs for you - please, provide with any kind of sample of your code or a complete demo, where the issue can be reproduced locally.
// Log first cell of clicked row
var cell = gridCats.cellByIndex(id, 0);
var value = cell.getValue();
console.log('Value: ' + value);
// Add new row
var id = new Date().getTime();
myGrid.addRow(id,['Blah blah', null]);
});[/code]
Run the app
3a) Click on a row, and the value of the first cell will be logged. A new row will be added.
3b) Click on the new row, and you get an error:
Uncaught TypeError: Cannot read property â0â of undefined dhtmlx.js:855
3c) Click on an old row (e.g. 1st) again and you will see a value.
3d) Sort the rows by clicking the column headers.
3e) Click the row at the same position (e.g. 1st) you will get the value that it had BEFORE it was sorted.
Unfortunately the issue still cannot be reproduced locally.
Your code works well for us. If the issue still occurs for you - please, provide with a complete demo, where it can be reproduced.
Here you can find a tutorial about creating a complete demo: docs.dhtmlx.com/doku.php?id=othe ⊠leted_demo
Did you even try? Some of the bugs you say arenât reproducible are pretty obvious.
Maybe the policy is to not check it out unless someone makes a testcase. Thatâs fine, but just say so.
Here I made one with love. (see attachment)
Firefox 24:
Chromium (Chrome) 29:
Opera 12.16
Case 1: Just do what the testcase sais (click first row, then click new row)
Case 2: Add
dhxGrid.setColSorting("str");
, sort the rows so they are the other way around and click. The name is returned from before sorting. grid_event_not_updating.zip (614 KB)
Yes that works! I was using the callback vars wrong. It just appeared to work because the default row IDs are almost similar to default index. Your solution was very simple.
var cell = dhxGrid.cellByIndex(id-1, 0); // Bad
var cell = dhxGrid.cells(id,0); // Good
Thank you!
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan