Array data (Array of row arrays) can be directly passed as the value of data key in dataModel object.



            
            
            
            
            
            
    obj.cellMouseDown = function (evt, ui) {
        cons.log("mouse down");
        var val = ui.dataModel.data[ui.rowIndx][ui.colIndx];
        ui.dataModel.mousedown = { rowIndx: ui.rowIndx, colIndx: ui.colIndx, val: val };
    }
    obj.cellMouseMove = function (evt, ui) {
        if (ui.dataModel.mousedown) {
            ui.dataModel.data[ui.rowIndx][ui.colIndx] = ui.dataModel.mousedown.val;
            cons.log("mouse move rowIndx = " + ui.rowIndx + ", colIndx = " + ui.colIndx);
            $grid.pqGrid("selection", { type: 'cell', method: 'add', rowIndx: ui.rowIndx, colIndx: ui.colIndx });
            $grid.pqGrid("refreshCell", { rowIndx: ui.rowIndx, colIndx: ui.colIndx });
        }
    }
    obj.cellMouseUp = function (evt, ui) {
        cons.log("mouse up rowIndx = " + ui.rowIndx + ", colIndx = " + ui.colIndx);
        //get all selection
        //chnage the values 
        //refresh the column or row.
        ui.dataModel.mousedown = null;
    }