I got this error when I call the function SerializeToCSV and I don’t know why
dhtmlx.js?2.2.3:9 Uncaught TypeError: Cannot read property '0' of undefined
dhtmlXGridObject._serializeRowToCVS @ dhtmlx.js?2.2.3:9
dhtmlXGridObject.serializeToCSV @ dhtmlx.js?2.2.3:9
I use this code for generate the rows
for(z in dati)
{
if (z != "tot")
{
var id = parseInt(z)+parseInt(numControllo * dati.length);
datiTable = []
datiTable = ['']
datiTable.push('F' + z);
}
else{
var id =parseInt(numControllo * dati.length);
datiTable = []
datiTable.push(some value);
datiTable.push('TOT');
}
if (numControllo % 2 == 0)
var color = "#eee";
else
var color = "#fff";
datiTable.push(other value);
datiTable.push(other value);
dhxGrid.addRow(id,datiTable,id);
dhxGrid.setRowColor(id,color);
}
dhxGrid.setRowspan(numControllo * dati.length,0,4);
dhxGrid.setColTypes("ro,ro,ro,ro");