I found that when creating a datatable, you can set the data:-property to an instance of webix.DataCollection. This is not mentioned in the api-docs, but I hope this is intended behavior, and will continue to work.
But, if I use a DataCollection as the data, the onAfterLoad-event on the datatable will not fire. The onAfterLoad on the DataCollection will fire.
But I would like to do something to my datatable when data has been loaded. A thing that I will not want to attach to the dataCollection.
you can try to set onStoreUpdated of DataTable’s data. Such an event handler can be set via “on” property of DataTable. But you need to apply “data->” prefix to the event name:
Webix team, please, try to offer complete documentation. A reference page like the Datatable events one should list all events. Developers should not have to magically know they need to look at some “Dynamic index columns” section in order to find an undocumented Datatable event.
If I understand correctly, events of the underlying data store are accessible via the data-> prefix.
This is exactly how it is. Writing data->someEvent is basically the same as writing $$("datatable").data.attachEvent(...) (as can be seen from the post above). The onParse event doesn’t fire in this case because of the DataCollection, since it is populating the DataStore’s pull directly via sync, without calling the methods that would trigger an onParse event.
The itemId from this sample is pointing to the id of the item that was updated in the store, as seen from the documentation. “This” will point to the datatable view in this case.