How to get Grid Data and assign it to variable.

Hi, how can i get my grid data (that is loaded as native json) and assign it to a variable.

for example extjs (sencha) has a very convenient way like


do you guys have something similar? or is there a way i can achieve same thing like extjs to get data from the dhtmlx grid?


Well seems like i ask question and then i end up answering myself after trial and error, (just my personal experience on this forum), if i don’t answer myself question seems like is never answered except the very first question i asked.

Anyway keeping the positive and making sure i can be helpful to someone else who may be looking a workaround for an issue/lack of feature.

here is what i did to get this to do what i needed.

  1. created a global var in the page to hold the data
    var myGridData;

  2. created a function called doAfterLoadRefresh
    function doAfterLoadRefresh {

             myGridData = myGrid.serialize();
  3. call this function as
    myGrid.load("/mytest_data.json", doAfterRefresh, “js”);

  4. if need to reload data using the var just use following, i tried and it works



i would still like to see how to get json data object out of grid.

Unfortunately it’s not available to get the data of the whole grid in the json format.