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

Column size changed event

Thread ID:

Created:

Updated:

Platform:

Replies:

10746 Feb 11,2004 08:47 AM Feb 11,2004 10:02 AM Windows Forms 1
loading
Tags: GridControl
Doug Lind
Asked On February 11, 2004 08:47 AM

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 10:02 AM

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.

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.

;