Unable to add width for checkbox column in grid

Hi Team, 

We have implemented checkbox in our grid. We need to have fixed width of that column, irrespective of other columns.

Issue: Grid Column's width is getting updated as per number of columns. Due to this if there are less columns in grid, checkbox column width is getting increased. We need to restrict it at 45px. We have tried to resolve this issue by adding width through CSS as well as adding attributes minWidth='45' width='45' maxWidth='45'. Still it is not getting resolved.

Can you please help us with the issue.

1 Reply

RS Rajapandiyan Settu Syncfusion Team August 26, 2021 01:39 PM UTC

Hi Rohit,  

Greetings from Syncfusion support.

Before proceeding with your query, we would like to share the behavior of the Grid structure. If we didn’t provide any width to the grid, then the default value auto is set to the grid width which adapts its parent container’s width.

For example, consider the parent container width or screen width is 1400px. Grid calculates total columns width and compares it with the parent containers width. If the parent container width greater than the total columns width then the remaining parent container width is equally shared to all the Columns like normal html table.

If the Grid’s total columns width exceeds its parent container width then the horizontal scrollbar shown in the Grid.

So, when you increase the window screen size, the parent container’s width equally shared to all the Columns. Since this is default behavior of html table.

Please let us know if you have any concerns.
 
  
Regards,  
Rajapandiyan S  


Loader.
Up arrow icon