Hello,
I need to set a ctrl+a functionality for grid. I write the code:
gridData.selectBlock(gridData.getRowId(0),0,gridData.getRowId(5),5);
and when I press ctrl+a I obtain a js error:
Ok, I thought, “maybe it is an error in script” and I’ve replaced all entrances of “myGrid” to “this” in function dhtmlXGridObject.prototype.selectBlock
in my dhtmlxgrid.js.
After that when I press ctrl+a I’ve got another error:
When I debug I see that “1” is the value of gridData.getRowId(0).
What I’m doing wrong?
PS. When I explicitly call
mySelectBlock(0,gridData.getRowId(0),gridData.getColumnCount()-1,gridData.getRowId(gridData.getRowsNum()-1));
where
function mySelectBlock(d,c,b,a)
{
c=gridData.getRowIndex(c);a=gridData.getRowIndex(a);gridData._CreateSelection(c,d);gridData._selectionArea=gridData._RedrawSelectionPos(gridData.cells2(c,d).cell,gridData.cells2(a,b).cell);gridData._ShowSelection();
}
is my re-implementation of dhtmlXGridObject.prototype.selectBlock, everything works