enableBlockSelection is not working on the locked columns


Could anyone know, how i can enable block selection for the locked columns (i.e. SplitAt Cols).
Is there any way to select the locked columns as well using ctrl+c event?

Thanks for all your help in advance.


Unfortunately the block selection is not available for the frozen columns.

Thanks for your quick reply.

I tried to fulfill this gap by attaching the onKeyPress event on the selected rows as shown below

mygrid.attachEvent(“onKeyPress”, copySelectedRows);

function copySelectedRows() {
var rows = mygrid.getSelectedRows();
var event = window.event;
if(event.ctrlKey && event.keyCode == 67){
var selectedRowIds = mygrid.getSelectedRows();
if (selectedRowIds != null) {
return true;

The above onkey press event is getting called only when we clicked twice on the row. Do you have any idea of calling in the single row selection.


Unfortunately your issue is not clear.

mygrid.attachEvent(“onKeyPress”, copySelectedRows);
the event occurs when the user presses the button on the keyboard but not clicks-doubleclicks the row, and your event works correctly in this case.

What about your code unfortunately there are no getSelectedRows, copyToClipboard methods in dhtmlxgrid.
Maybe it should be getSelectedRowId and copyBlockToClipboard? anyway block selection still cannot be enabled in a frozen part of the grid.

Thanks for you response. The methods getSelectedRows and copyToClipboard functions are wrapped. These function are working fine and didn’t have any issues.

I agree the event ‘onKeyPress’ occurs only when any one of the key is pressed, but it’s not in the dhtmlx grid page in my case. This was the issue for me.

Let me explain what’s happening at my end. The code snippet posted in the previous post is for copying the selected rows on key press event. This event is not triggered on the dhtmlx grid, If i tried to select one or more rows on the grid and then press Ctrl + C or Ctrl keys the event is not getting fired. This event is getting triggered only if i click second time on the grid.

I hope you got my problem.

Many Thanks for all your help and information provided to me.


Unfortunately the issue cannot be reconstructed.
Please, provide with a complete demo, where the issue can be reproduced.
Here you can find a tutorial:
docs.dhtmlx.com/doku.php?id=othe … leted_demo

Unfortunately I’m unable to replicate the issue with the sample. There might be some issue with our other Javascript functions. I will verify it once and see what is exactly causing intrupt to the onkeypress event.

Thanks you so much for your help and information.