Autofitcolumns is not considering font-size

I've searched for an official way of manipulating the cell font-size, and the only answer i've found here from the team was to change the css. I use the grid in a dynamic dashboard where the user can input the font-size. So i change the font-size by using javascript, it would have the same effect as applying css.

But when i use autofitcolumns with an big font-size, it does not aufo-fit by it's contet. It appears that it doesn't considrer the cell font-size.

Attachment: grid_17201ecf.zip

1 Reply 1 reply marked as answer

MS Manivel Sellamuthu Syncfusion Team November 24, 2020 12:50 PM UTC

Hi Jean, 

Greetings from Syncfusion support. 

We have validated your requirement. While using large font-size the default border spacing is changed, so we suggest you to use the below CSS to resolve the reported issue. Please refer the below code example and sample for more information. 

// to increase the font size 
.e-grid .e-rowcell { 
  font-size: 32px; 
} 
 
// to maintain the border spacing 
.e-table.e-resizetable { 
  border-spacing: 2px; 
} 



Please let us know, if you need further assistance. 

Regards, 
Manivel 


Marked as answer
Loader.
Up arrow icon