Grid. How should I use function selectBlock()?

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

Also I think that in documentation page https://docs.dhtmlx.com/api__dhtmlxgrid_selectblock.html the order of parameters is wrong.

It should be

void selectBlock(number start_col,string/number start_row,number end_column,string/number end_row);

Am I right?

replacing all the “myGrid” with the “this” is the correct solution. This problem is already fixed in the latest version of the dhtmlxGrid.
The correct order of the selectBlock() method attributes is:
1 - start column index
2 - start row Id
3 - end column index
4 - end row Id