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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Resizing Columns equally

Thread ID:





10311 Jan 29,2004 07:49 AM UTC Jan 29,2004 07:58 AM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On January 29, 2004 07:49 AM UTC

I want to resize columns (A, B, C, D) equally when the parent window sizes. Eventually i''d like to have the user resize a column and have the others reflect the ''proportions'' set by the user for future resizes. Also I''d like to be able to size 2 adjacent columns at the same time, so if you make A larger then B has to shrink and it you make B smaller then C gets bigger. The code I have for resizing is as follows and it called in the Resize event for the databound grid. ------------------------- int widthForEachCol = this.ClientRectangle.Width / GridBoundColumns.Count; try { this.SuspendLayout(); for (int i=1; i

Administrator [Syncfusion]
Replied On January 29, 2004 07:58 AM UTC

Try setting the grid.SmoothControlResize = false to see if that makes this refresh problem go away. One way to dynamically control column widths is to use the grid.Model.QueryColWidth event to dynamically provide e.Size based on e.Index. To see sample uses of this, check the Syncfusion\Essential Suite\Grid\Samples\DataBound\GridDataBoundImageCell sample. It uses this event to always have the columns equally sized.


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

Live Chat Icon For mobile
Live Chat Icon