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

DataGrid Column Sizing

How do I set the column width to automatically accommodate the largest string in a bound datatable. I tried manipulating the DataGridTextBoxColumn.Width property of the TableStyle but I cannot get that to work. Thanks, Huib

1 Reply

CB Clay Burch Syncfusion Team May 6, 2002 04:46 AM UTC

One way you can do this is to track the maximum width as you use MeasureString to compute the width of the column items. Here is a FAQ link that does this. http://www.syncfusion.com/faq/windowsforms/search/877.aspx Regards, Clay

Live Chat Icon For mobile
Up arrow icon