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

Resizing Columns equally

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
1 Reply

AD Administrator Syncfusion Team 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.

Live Chat Icon For mobile
Up arrow icon