Copy multiple columns and paste in the last column. Why create a new column?

Tags: #<Tag:0x00007fd2ce55a660>

I copied 10 columns from Excel and pasted them into hot.

My hot only has 5 columns, and I want to paste only 5 columns of data,

But hot created five extra columns to accommodate my replicated data.

Is this a design, or a BUG?

How do I control the number of columns that only copy my hot instance?

Thank you

Hi,

It’s by design. Spreadsheets are unlimited, so with dynamic column number this numbers is… well, dynamic. You should be able to limit columns with maxCols, or by specifying columns and Handsontable should limit itself

Wojciech

@wojciech.czerniak
hello

When I changed the size of the browser window, the table was not maximized after it was restored to maximum size, and part of it was not displayed.

If I turn cell edit on and then turn cell edit off, the instance will rerender and go back to normal.

But I call hot-render () by listening for the event. It didn’t work.

$(window).resize(function () {
     _this.hot.render();
  });

I know he rendered it, but the style still hasn’t been restored.

I don’t know what the difference is between this rendering and the rendering closed to cell editing.

Sorry, but without demo I can’t say much about your use case. To update grid dimensions we have hot.refreshDimensions() method.

You can read more about grid sizing in the docs: https://handsontable.com/docs/7.2.2/tutorial-grid-sizing.html

Sorry, I used 6.2.2

Hey @MaLaTang

does it mean that now it works for you?

This function does not exist in 6.2.2

Yes, but as you planning to update from 6.2.2?

@aleksandra_budnik
@wojciech.czerniak
Thank you for your reply. I have solved this problem by other means.

But at the same time, there’s a new problem:

I rewrote the TextEditor editor and it worked fine.

However, when my cell is set to numeric, my TextEditor custom is completely invalid.

I know of a way to rewrite the NumericEditor editor as well.

There are ways to override the underlying editor so that all types of cells can fit.

Can I override BaseEditor? Any examples?

Hey @MaLaTang

here’s a tutorial for the editor https://handsontable.com/docs/7.2.2/tutorial-cell-editor.html
In the tutorial we listed all the methods and code examples that should help you to build your custom tutorial.