dhtmlxDataStore cant attach handler to onStoreUpdated event.

I was told to post this question here.
Hi, i’m trying to listen to the “onStoreUpdated” event on the datastore, but it doesn’t seem to be called.

I took the sample at samples/dhtmlxDataStore/03_dynloading/03_grid_dynsrnd.html. I tried to attach a handler like this:

     function(id, data, mode) {
         console.log("StoreUpdated :D");
         return true;

When I change the data on any of the grids, it is never called.

Somehow, if type this on the console:

data.callEvent("onStoreUpdated", ["arguments", "dont", "matter"]);

The event fires and I get the expected output.
I think this may be a bug on the dataStore. Am I doing something wrong?.

I’m attaching my modified 03_grid_dynsrnd.html file. It only adds the attachEvent line on the script Everything else it’s exactly as it was on the dhtmlxSuite samples.

Thank you.
03_grid_dynsrnd.zip (952 Bytes)

Try to use code like next

var store = new dhtmlXDataStore({
function(id, data, mode) {

The onStoreUpdated is the inner event of datastore, and you can use store.data.attachEvent instead of store.attachEvent.