Custom DataLoader for Grid or DataSore

Hi Guys,

I need some help/suggestion Please!

After hours of investigation on the forum and a lot of googeling, I was not able to find a best practice for the following problematic.
I’m currently building a web application with a domain model based on Ember domain model using Emberjs JavaScript MVC framework. I’m using also the dhtmlxGrid with the global data storage - dhtmlxDataStore (I will be using/integrating other components later on like charts, forms, etc.). The grid is bound to the store through the sync API to load the data. All those components will be using the same source of data: the dhtmxDataStore through the sync API.

The grid is setup with infinite scroll using smart rendering. Because of the integration with Ember, I’m trying to find a way not to let the grid/store retrieving data directly from the server, because I have a ember data manager already providing access to data.

From the docs and the forum, I couldn’t find anything about it. Does DHTMLX provides an API for custom data loding? [color=red]What I need is a way of passing a custom data loader (or overriding the existing one) with some functionalities that should take care of the portion doing the ajax call to the server to retieve data.

This is the work arround I’m using right now:

// my store component
store = Ember.Object.extend ({


  // store initialization
  init: function() {
    data = dataManager.getData(url); // data in json format
    dhtmlxStore.parse (data)

  // custom API use to control dynamic loading of the grid
  loadData: function (start, count) {
    data = dataManager.getData(url, start, count); // data in json format
    dhtmlxStore.parse (data)

  getDHTMLXStore: function() {
    return dhtlmxStore;


// my grid component
grid = Ember.Object.extend ({


  // grid initialization
  init: function () {

       // intercept the loading request and inject a custom loader
      dhtmlxGrid.attachEvent("onDynXLS", function (start, count) {
        store.loadData (start, count);
        return false;

      // bound the grid to the store



This solution is just working great, but I’m wondering if that is a best practice and the way to go for this kind of problematic?
Is there from DHX any thought for integration with third party JavaScript MVC FrameWork? Or is that out of scope for the moment?

By the way, I’m using DhtmlxSuite version 3.5 pro

Thank you for any comment, suggestion.