fillHandle - Drag/Copy and cell double click option

Tags: #<Tag:0x00007f8b2a196b28>

Hi All,

Need your help on handsontable grid.

To copy multiple cells we have few options as below.

  1. Copy the cell > Click on the header > Ctrl + V - This copies to all the rows.
  2. Drag and Copy till the row you wanted to copy.
  3. Enter a value in the cell > move to the next cell > double click the fill handle on the cell - This fill the selection down to the last value in neighboring column.

My Question is that can we disable only the option 3.

Hi @chandup83

you can block a fill-handle for all the cases but as I understand it will also block the second scenario.

Am I thinking right that the second and third scenario differs only on the first edit level? In the second scenario I firstly edit a cell and then use a fill-handle and in the third, I do not edit anything and just use the fill-handle?

Thanks @aleksandra_budnik for the quick response.

The option I found to disable the third scenario is commented out this line in handsontable.full.js as we don’t want this scenario in our application

this.instance.view.wt.wtSettings.settings.onCellCornerDblClick = function() {
//instance.autofill.selectAdjacent();
};

That works fine but an option available to disable only this should be an added advantage.

There’s also a hook called afterOnCellCornerDblClick. You can try to use it instead.

Can we avoid user selecting Multiple Column to delete rows as below cases? I want the user to select only vertical direction

Hi @chandup83

you can use the beforeAutofill callback to block actions of the fillhandle.

It provides 3 parameters: start, end and data.

Let me know if that helped and if not please create a demo and a scenario of the issue and we will test it together.

Thanks @aleksandra_budnik

You’re welcome @chandup83

I guess that we can close the topic.