Data grid fixed column widht and autoFitColumns() issue

Hello,

I have a data grid that has fixed 60px width on the first column. The other two columns dont have fixed width.

Because these two columns without a fixed width can contain a large text I want to make sure that the text is not wrapped/hidden and I call the autoFitColumns() method only for these two columns inside the dataBound event handler.

This autoFitColumns() also touches the width of the first column and its not fixed 60px anymore even though I didnt execute autoFitColumns() for it. 

How can I achieve the case that the first column width is fixed and never changed and the other columns are auto fit so  that the text is not wrapped/hidden?


Here is a link to the sandbox - https://codesandbox.io/s/vue-forked-px12n?file=/src/App.vue


1 Reply

SK Sujith Kumar Rajkumar Syncfusion Team October 12, 2021 01:45 PM UTC

Hi Alex, 
 
Greetings from Syncfusion support. 
 
Based on the query we would like to let you know that when resize mode is set as ‘Auto’ and the autoFitColumns method is called, then it will auto adjust the columns based on its content initially and then the remaining Grid element width will be split and auto adjusted to the columns(including the fixed width columns) automatically(since resize mode is set as ‘Auto’). This is its default behavior of the Grid’s resize and autofit functionality. 
 
Let us know if you have any concerns. 
 
Regards, 
Sujith R 


Loader.
Up arrow icon