grid.serialize() bug???

Hi dhtmlx team, i was using grid.serialize in order to send data between two grids, the scenario is as follows.

Grid # 1 with fist column with a checkbox, i select the rows that i want with the checkbox in order to know what rows serialize, my code looks like


and i one button like

myXmlStr = grid.serialize();
window.xml_data = myXmlStr; //i used this in order to get myXmlStr in a poput with grid # 2

Grid # 2 same data as first grid, but with fisrt column hidden

my code


and everything is ok, i can get the second grid in a popup with the same data of grid # 1 (only data checked)

Problem: when i check a row in grid # 1 as far as i know, the state of this row was changed, but if i unchecked the same row, the state change again, so, when i do the serialize, my grid # 2 appears with all data checked and the data that was checked and then unchecked.

How can i avoid this problem?

Thank you very much for your reply.

When you uncheck checkbox you should mark it not changed with following code:


You can use “onCheck” event to check when the user check or uncheck checkbox

Hi Olga thank you, finally my code looks like

grid.attachEvent(“onCheck”,function(rowId, cellInd, state){
//alert (“checked”);
//alert (state);
if (state==false){

Best regards, Euler Sánchez G.