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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Column size changed event

Thread ID:

Created:

Updated:

Platform:

Replies:

10746 Feb 11,2004 01:47 PM UTC Feb 11,2004 03:02 PM UTC WinForms 1
loading
Tags: GridControl
Doug Lind
Asked On February 11, 2004 01:47 PM UTC

Hi, I''m looking for an event in a GDBG that tells me when a user has changed a column width. The overall goal is to resize row heights, to ensure that all cell contents are displayed when a column is resized. Alternatively, if there is a setting to always auto resize row heights, that would work too. Thanks, Doug Lind

Administrator [Syncfusion]
Replied On February 11, 2004 03:02 PM UTC

One way you can do this is to set a flag in the ResizingCols event, and then resize teh rowheights in MouseUp if the flag is set.
private bool resized = false;
private void gridDataBoundGrid1_ResizingColumns(object sender, GridResizingColumnsEventArgs e)
{
	if(e.Reason == GridResizeCellsReason.MouseDown)
		this.resized = true;
}

private void gridDataBoundGrid1_MouseUp(object sender, MouseEventArgs e)
{
	if(this.resized)
	{
	this.gridDataBoundGrid1.Model.RowHeights.ResizeToFit(GridRangeInfo.Table());
		this.resized = 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.

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

;