Double Click Functionality

When double clicking on the row header, the apparent functionality is to re-size the column to a default size. Is this correct? What is the default size, and how can I prevent this functionality?

1 Reply

AD Administrator Syncfusion Team November 23, 2003 04:54 PM UTC

This is by design. Double-click will reset the column to its default width. You can set the default with with code like grid.DefaultRowHeight = xxx. However the ResizingColumns event lets you implement whatever behavior you want. Here is the code snippet that autosizes the column.
private void grid_ResizingColumns(object sender, GridResizingColumnsEventArgs e)
{
	if(e.Reason.Equals(GridResizeCellsReason.DoubleClick))
	{
		GridRangeInfo range = GridRangeInfo.Cols(1,3); 
		this.grid.Model.ColWidths.ResizeToFit(range);
		e.Cancel = true;
	}
}
Here is a little sample.

Loader.
Up arrow icon