Can we dynamically add row in datatable?

can we dynamically add row in datatable, using clipboard, copy from excel to blank datatable. I tried create a table with few blank line for example, 5 blank lines but the data copied from excel is 10 lines when we paste onto the table it will only replace by 5 row. Can we dynamically add row according to copied data?

Hello, @sa@savirusing

It’s possible to add rows in datatable dynamically in conjunction with clipboard.
For that purpose, it’s necessary datatable to have clipboard: "custom", to get an opportunity of creating your custom behavior of adding data to datatable after copying.
By default, clipboard works only on selected data. To use it on the datatable regardless of whether or not it is empty, we suggest adding an additional Element: paste event on an empty area of the Datatable view.
There is a possibility to convert copied from Excel data as CSV string to a Javascript data array. For that purpose use parse method.
Here is an example: Code Snippet
Just copy some data from excel and add it to the working area.
To test copypasting data on non-empty datatable, uncomment data property in line 12 of the code

1 Like