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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Autosize columns programmaticaly

Thread ID:





129996 Apr 13,2017 01:12 PM UTC Apr 21,2017 01:01 PM UTC ASP.NET Web Forms 4
Tags: Grid
Asked On April 13, 2017 01:12 PM UTC


I would like to put in "autosize" all columns in my grid programmaticaly because my datasource change each time.
Someone can explain me how can i do that ?

Thank you.


Sorry for my english.

Saravanan Arunachalam [Syncfusion]
Replied On April 14, 2017 09:22 AM UTC

Hi Marchesini, 
Thanks for contacting Syncfusion’s support. 
We have analyzed your requirement and we can achieved it by using allowResizeToFit and commonWidth property of Grid control. Please refer to the following online api reference link. 
Saravanan A. 

Replied On April 20, 2017 12:52 PM UTC

Thank for your reply. I will test and i go back to you.

Replied On April 20, 2017 01:08 PM UTC

So i don't find commonWidth in grid, i forgot to tell you that i use "Web forms" in C#/VB.net and the link you gave me tip on API Javascript.

Prasanna Kumar Viswanathan [Syncfusion]
Replied On April 21, 2017 01:01 PM UTC

Hi Marchesini, 

Sorry for the inconvenience caused. 

To set the column width based on the content, we suggest you to use only the AllowResizeToFit property in Grid.  

For more information, refer the below help document.  

Prasanna Kumar N.S.V 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon