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.
Syncfusion Feedback

Double clicking on cell border event

Thread ID:

Created:

Updated:

Platform:

Replies:

22022 Dec 1,2004 05:04 PM UTC Dec 1,2004 05:12 PM UTC Windows Forms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On December 1, 2004 05:04 PM UTC

Hi, I am wonder if there is any way that I can subscribe to double clicking event on the cell border. I have the header row hidden, but the user can resize the column by dragging the column (cell border) diver. I want to handle double clicking on the vertical cell border to resize to fit the column. thanks...

Administrator [Syncfusion]
Replied On December 1, 2004 05:12 PM UTC

You can do it handling the ResizingCols event.
private void gridControl1_ResizingColumns(object sender, GridResizingColumnsEventArgs e)
{
	if(e.Reason == GridResizeCellsReason.DoubleClick)
	{
		this.gridControl1.ColWidths.ResizeToFit(e.Columns, GridResizeToFitOptions.IncludeHeaders);
		e.Cancel = true;
	}
}

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

;