How can i export datagrid to a json string?

how can i export datagrid to a json string?

i wanna save the datas of a table ,every row,so i think how can i change griddatas to json style.

Unfortunately it’s not available to export grid to json.
But you may serialize it to xml or csv. Here is the tutorial:
docs.dhtmlx.com/doku.php?id=dhtm … ialization

thank you very much…i get it out…thanks

Don’t know why noone still dont mention this, but its quite simple function…

function dhxSerializeGridToJson(grid){
var json = {};
grid.forEachRow(function(id){
json[id] = [];
grid.forEachCell(id,function(cellObj,ind){
json[id][ind] = grid.cells(id,ind).getValue();
});
});

return JSON.stringify(json);

}