DataGrid Row Height - Can get bigger but not smaller


I have read the other questions and answers about this however I still couldn't make it work.

The default row height is 36px. I want to make it smaller. I use RowRender action on the DataGrid. If I make it greater than 36px, it works fine. But when I set the row height smaller than 36px, nothing changes.


Even playing with dev tools doesn't affect anything. Any idea about what I'm missing?

Padding and line-height ...

By default there is no height set. The td has 0.5rem (8px) padding. This combined with the default line-height of 20px makes for the 36px height. So to decrease it you have to set your own padding (less than 8px) and line-height.

From inner to outer:




I had already set padding to 0. Even if I set a line-height on the tr or td tag, it doesn't change anything.

Because rz-cell-data has line-height: 1.5 (visible in your first screenshot).

I know but it has no effect on the row height unfortunately. It only changes the span height.


td stays the same

This is now what I am seeing.

You have the proof that it works indeed :slight_smile: Somehow, when I try the same thing on my project, nothing changes. I will remove all custom css classes and retry.

Thanks korchev.