We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Auto fit all columns

Hi All,

How to call Auto fit all columns programmatically which has the option in FilterSettings = { type: 'Excel' }. And also after the columns auto fitted I want to change some columns size manually by code. This would be call inside a subscribe.

Thank you.

3 Replies

MS Madhu Sudhanan P Syncfusion Team March 29, 2019 12:49 AM

Hi Shamil, 

Thanks for contacting Syncfusion support. 

You can use the autoFitColumns method without any parameter in the dataBound to autofill all columns. Please refer to the below help link. 


 

Also you have mentioned as “after the columns auto fitted I want to change some columns size manually”, are you expecting to increase the column width? Could you please clarify us with more information on this requirement.  

Regards, 
Madhu Sudhanan P 



NE Neo replied to Madhu Sudhanan P April 1, 2019 02:20 AM

Hi Shamil, 

Thanks for contacting Syncfusion support. 

You can use the autoFitColumns method without any parameter in the dataBound to autofill all columns. Please refer to the below help link. 


 

Also you have mentioned as “after the columns auto fitted I want to change some columns size manually”, are you expecting to increase the column width? Could you please clarify us with more information on this requirement.  

Regards, 
Madhu Sudhanan P 


Hi Madhu,

autoFitColumns working according to your guidance. In the second requirement I asked, How to set static width for some specific columns without changing when call to the autoFitColumns method.

Thank you.


MS Madhu Sudhanan P Syncfusion Team April 2, 2019 02:29 AM

Hi Shamil, 

Thanks for the update. 

To maintain static width while auto fitting set the width, minWidth and maxWidth property of the column to the same value. Now the autoFitColumns will not have any effect on those columns. 

Regards, 
Madhu Sudhanan P 


Loader.
Live Chat Icon For mobile
Up arrow icon