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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

AllowSelection == Cell and Sorting

Thread ID:

Created:

Updated:

Platform:

Replies:

3514 Mar 26,2003 03:15 PM UTC Mar 26,2003 10:03 PM UTC WinForms 1
loading
Tags: GridControl
Sean Greer
Asked On March 26, 2003 03:15 PM UTC

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

Administrator [Syncfusion]
Replied On March 26, 2003 10:03 PM UTC

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);
	}
}

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

;