Setting rowHeight of Datatable with button or select

Hello!

I’ve been trying to have a few buttons or a select dropdown that allows a user to choose a rowHeight of their choice, along with this a css class will be set to change font height etc.

However, setting rowHeight with define doesn’t seem to work. When I click my button nothing initially happens. Upon changing window size, the number of rows visible adjusts like the datatable has recognized the row height change but isn’t changing the actual row height.

For example, if I define row height to 250 and window size is 750, 3 rows are visible but they take up the default rowHeight still

Thanks for the help

Hello,

Yep, row height cannot be changed that easily. But you can implement this functionality by setting the fixedRowHeight to false and providing the custom height for each row as:

$$("table").data.each(function(obj){
   obj.$height = height;
});
$$("table").refresh();

Check the following snippet, please: https://webix.com/snippet/a828beeb

1 Like