Paste entire row data using ctrl+v is not populating all the fields in that row

Tags: #<Tag:0x00007efc64f3f770>

Hi Team,

we are facing an issue where copy-paste using keyboard is not populating all the cell values. some cell values are left blank. here are the steps we are performing in our application.

our application is showing handsontable grid in panel using bootstrap. at given point of time, only 10 fields are editable on our grid, you have to scroll horizontally towards right to view the rest of the columns on the grid. the steps to reproduce this issue are -

  1. copy the entire row by using ctrl+C. we have around 35 columns in our grid. 10 columns are editable. rest are readonly. lets say we copied data from row-10.
  2. add a new row below the row-10. lets call this newly added row as row-11. when we add a new row in our application, we enable few more fields to be editable. so for brand new records, we allow total of 15 fields editable.
  3. when we paste the data using ctrl+v (using keyboard), only first 10 editable fields are populated with data in row-11. Next 5 fields are populated blank. these 5 fields are made editable only for brand new records and they should have been populated with copied values but they are not.

while playing around, we found that if we scroll horizontally to the end of grid, and then do a paste then it populates the values in all 15 fields. but this work-around it not user friendly. we cannot ask user to scroll horizontally every time to add a new record and paste data.

we are using version 1.10.1. we cannot upgrade to your latest version at this point because there are code breaking changes. how can we fix this issue for our version?

thanks

Hi @rohit.parwal

I am not sure if I understand the case. Would you like to paste the data into read-only cells? If I misunderstood it please let me know how to replicate the issue on this Fiddle http://jsfiddle.net/xcq5etmv/

ps. we cannot fix previous versions. By fixing some bugs we automatically boost a version from latest.

Hi,

yes I would like to paste data into read-only fields, but as soon as a new row is added, I am making read-only fields editable, so that they can altered. The issue happens when I am trying to copy-paste values into these cells ( which recently became editable). The issue happens because these cells are not on the viewport, they are present on the extreme right of grid and I am on the extreme left of the grid when doing copy-paste.

so we resolved this issue using -

beforeCreateRow: function(index, amount, source){
this.updateSettings({
viewportColumnRenderingOffset: this.countCols(),
});
}

This is why I raised another ticket to ask you about if any performance issue with viewportColumnRenderingOffset.

Please let me know if there is any other way to fix the copy-paste problem.

thanks

I am happy to hear that you have done necessary changes to skip the issue.

Can you share a link to the other issue about viewportColumnRenderingOffset. I cannot find it.

Hello Aleksandra,

here is the link - Are there any performance issues with viewportRowRenderingOffset

Oh yes, thank you.

I can see that I have already replied the topic.

I am closing this issue and we should continue the conversation there.