jqGrid + DWR

jqGrid + DWR

Hi, I'm using DWR to obtain the data. In the callback function I have all the results and I need to reload the grid.

I have something like this.

DWR Callback:

var data = new Array(result.length);

for (var i=0; i<result.length; i++) { // In result I have all the data
var row = new Array()
row[0] = result[i].xx;
row[1] = result[i].yy;
row[N] = result[i].zz;
data[i] = row;
}

reloadGrid(data);

And in the reload function I need something like this:

function reloadGrid(data) {

for(var i=0;i<=data.length;i++) jQuery(â€