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.
Up arrow icon