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

Grid not redrawing properly when using QueryColWidth

Thread ID:

Created:

Updated:

Platform:

Replies:

8419 Nov 5,2003 02:23 PM UTC Nov 5,2003 02:26 PM UTC WinForms 1
loading
Tags: GridControl
ERobishaw
Asked On November 5, 2003 02:23 PM UTC

I have 5 columns in a grid (databound). I want the first column (column 1)'s width set automatically...which it is. The remaining columns I want to fill the grid space evenly. So this is what I do: private void Model_QueryColWidth(object sender, GridRowColSizeEventArgs e) { if (e.Index>1) { int cSize=0, leftPart =0; cSize = GridControl1.ClientRectangle.Width; leftPart = gridControl1.Model.ColWidths[0] + gridControl1.Model.ColWidths[1]; e.Size = (cSize - leftPart) / 4; e.Handled =true; } } This works great UNTIL I resize the grid (its Anchored to the form and resizes automatically). When I do, attached is a picture of the results (PDF) Thanks Eric

ERobishaw
Replied On November 5, 2003 02:26 PM UTC

Never mind: Found the fix: gridControl1.SmoothControlResize =false;

CONFIRMATION

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

or the page will be automatically redirected to 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

;