How to set startRows programetically

As I am handeling a large database so I only want to load some specific entries from the database. So I use ajax to make a SQL query for some specific entries(i.e for a month). I am facing two types of problem,

i) It loads blank rows before.
ii) Only load no. of rows set by startRows parameter

I want to set startRows parameter programmatically to number of rows return by the SQL query through ajax. Secondly only loads the data rows with proper rowID not the blank ones.

For the second one(hiding blank rows) is there a way to set it programmatically in Trim Rows Plugin/Hidden Rows Plugin?

Please help!!

If you do not know which rows are fully empty you can use a FOR loop with a isEmptyRow method and then pass indexes to hiddenRows https://docs.handsontable.com/pro/1.8.0/demo-hiding-rows.html

I’ll try it. Thanks for the help.

I will leave this issue opened. Please confirm that it solved the issue after you test it.

Thanks in advance.

Yes I solved it out.

Great, happy to get a second confirmation from you @dassoubarna today
Have a great day