What I would like to do is have the grid resize in height when the user selects more rows to display. For example, if in the example above, one selects 30 rows to display, I would like the grid to show all 30 rows without any vertical scroll bars.
dhtmlxGrid doesn’t have appropriate api to change grid container height on runtime. You may change grid container height manually with JavaScript.
To calculate desire height you may use getSelectedRowId method to get number of selected row and multiply it to the grid row height. If you are not using multi line mode, row height is 20px
Is there a way to add up all the row heights to get an exact count?
You may iterate through all rows in grid get its offsetHeight. But it may slow down grid performance
Also, what events do I need to attach to?
You can use “onRowSelect” event
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan