just update addData function like this to fix it.
$('thead tr:first th', g.hDiv).each( //add cell
function () {
var td = document.createElement('td');
var idx = $(this).attr('axis').substr(3);
td.align = this.align;
// If the json elements aren't named (which is typical), use numeric order
if (typeof row.cell != "undefined" && typeof row.cell[idx] != "undefined") {
td.innerHTML = (row.cell[idx] != null) ? row.cell[idx] : ''; //null-check for Opera-browser
} else {
td.innerHTML = row[p.colModel[idx].name];
}
$(td).attr('abbr', $(this).attr('abbr'));
$(tr).append(td);
td = null;
}
);
if ($('thead', this.gDiv).length < 1) {//handle if grid has no headers
for (idx = 0; idx < cell.length; idx++) {
var td = document.createElement('td');
// If the json elements aren't named (which is typical), use numeric order
if (typeof row.cell != "undefined" && typeof row.cell[idx] != "undefined") {
td.innerHTML = (row.cell[idx] != null) ? row.cell[idx] : ''; //null-check for Opera-browser
} else {
td.innerHTML = row[p.colModel[idx].name];
}
$(tr).append(td);
td = null;
}
}
Original issue reported on code.google.com by linh...@gmail.com on 19 Mar 2012 at 9:56
Original issue reported on code.google.com by
linh...@gmail.com
on 19 Mar 2012 at 9:56