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

AllowSelection == Cell and Sorting

Using version 1.5.2.1, when I set the AllowSelection property of a GDBG to Cell the grid no longer supports sorting. That is, clicking on the column header does not result in the grid being sorted by that column (SortBehavior is set to SingleClick). Setting AllowSelection to None (or All, haven't tried all combinations) fixes this issue. Is this by design? Sean

1 Reply

AD Administrator Syncfusion Team March 26, 2003 05:03 PM

Sean, I'll have to ask Stefan whether this is by design. Allowing Columns setting also makes things work. If you really want a particular set of settings that disables the Sorting, you can always handle gridDataBoundGrid1_Click or gridDataBoundGrid1_CellClick, and explicitly call the SortColumn method.
private void gridDataBoundGrid1_Click(object sender, System.EventArgs e)
{
	int row, col;
	this.gridDataBoundGrid1.PointToRowCol(this.gridDataBoundGrid1.PointToClient(Control.MousePosition), out row, out col);
	if(row == 0 && col >0)
	{
		this.gridDataBoundGrid1.SortColumn(col);
	}
}

Loader.
Live Chat Icon For mobile
Up arrow icon