Handsontable for Angular 4

Tags: #<Tag:0x00007efc6b7761b8>

https://handsontable.github.io/angular-handsontable

I want to know if this wraper can work with handsontable pro and how can I use Nested Headers in this case, because in Example section there are only basic handsontable examples.

Another big question for me is: If i select 3 rows and want to paste them at the bottom of the table, is there any way to prevent table creating new rows? to block table to custom dimensions.

Is there any example of how to use handsontable pro with angular 4 ?

I succeeded to make it work with pro version , all I had to change was :

from : import { HotTableModule } from ‘angular-handsontable’;
to: import { HotTableModule } from ‘angular-handsontable/index’;

I don’t know if this was the correct approach, but it worked and I could implement nested headers

Now I have 2 questions:

  1. Is it a way to set the licenseKey globally? instead of adding it on every table?
  2. How can I handle that selection problem described above? Is there any way to block table dimensions? If user select 4 rows and goes on the last row of the table to paste them, then I need to paste only the first row ( from the selected ones) and ignore the rest.

How can you close this issue when you see that I have 2 questions ???

Hi @aleksandra_budnik

Sorry, I don’t know how could I missed that. Please find the answers below

1) Is it a way to set the licenseKey globally? instead of adding it on every table?
Currently, there is no way to add the key globally. The system that tracks if the license is valid is bounded to the instance settings.

  1. How can I handle that selection problem described above? Is there any way to block table dimensions? If user select 4 rows and goes on the last row of the table to paste them, then I need to paste only the first row ( from the selected ones) and ignore the rest.
    To block row new rows of being added you can use the maxRows option. Here is an example http://jsfiddle.net/handsoncode/anukp8wm/ (we allow the table to have max 7 rows).

Is there anything else I can do for you?

ps. I can see that you have posted a similar issue here Working with handsontable pro & Angular 4
but also asked for https://github.com/handsontable/handsontable/issues/4575

I will answer the question from https://github.com/handsontable/handsontable/issues/4575 and at Working with handsontable pro & Angular 4 to let the other users looking for the same case.

Hi @aleksandra_budnik, Thank you for your quick answer… Your jsfiddle works like a charm and I am grateful.

Is there any way to catch the paste event , and also the affected cells (with index)? ( I need this using Angular 4 wraper )

Here’s a paste event demo http://jsfiddle.net/handsoncode/ukmwkyh8/ using ‘beforePaste’.

If you’d find any difficulties with the angular version just let me know.

I used beforeChange event and works like I expected… Thank you very much . You can close this. Have a nice weekend

Great to hear that. I am also happy that we have checked this before the weekend.

Thank you and have a good one as well.