Handsontable height based on the data

Hi,

Based on the data I need to show handsontable without scroll bar, how can I achieve that?

Hi @muh6mm3d

the height of the table is strict and it uses pixel values for height and width parameters. If you have a set height for rows you can count the table height by doing

amount of rows x row height + 1 x column header height

but for rows that can take more space it won’t help.

Hi @aleksandra_budnik

I have two scenarios, one with fixed number of rows and other with dynamically adding rows.

I am trying to fix the height for fixed number of rows. In that, I was able to update the handsontable height dynamically after loading data and it is working using the following code,

		tempData.height = $('.ht_master .wtHider').height();
		 
		debugger;
		tempData.hotInstance.updateSettings({
		        height:  $('.ht_master .wtHider').height();
		 });

if the $(’.ht_master .wtHider’).height() is more than 2000 (i.e., 100+ rows) , then the above code is not working, the hider value is getting updated after update the height dynamically. I tried to update the wtHolder height also, but that is also not working in some scenarios.

Can you suggest anything if I am anything missing in this.

Hi @muh6mm3d

There’s one issue that may cause the problem https://github.com/handsontable/handsontable/issues/4141