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

Double clicking on cell border event

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

1 Reply

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

Loader.
Live Chat Icon For mobile
Up arrow icon