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

Moving Columns and FilterBar

When i attach a custom FilterBar on my grid which has column dragging option enabled the filter bar is not working (does not accept any input), but it does when i remove the GridControllerOptions.DragColumnHeader setting. Am i missing something here? Is this behaviour correct ?

4 Replies

AD Administrator Syncfusion Team November 23, 2005 09:21 AM UTC

I tried to see this behavior in the sample we ship, but moving columns seems to work OK there, not affecting the filtering. \Essential Studio\3.3.0.0\Windows\Grid.Windows\Samples\DataBound\FilterBarGrid Can you see the problem in this sample somehow? In your customization, are you woring with hard coded column indexes some how? If you can upload a sample project showing the problem or tell us how to see it in the above sample, maybe we can suggest a solution.


AD Administrator Syncfusion Team November 23, 2005 09:37 AM UTC

I can see the problem. I just thought you were using AllowDragCols. But setting the other option does break something. Will look into it.


AD Administrator Syncfusion Team November 23, 2005 12:32 PM UTC

The problem is that the filter row is really a second header row. And this DragColumnHeader mouse controller handles all clicks into headers. This is why the dropdown is not happening. Try this. Subscribe to the QueryAllowDragColumnHeader event, and there have code like:
private void gridDataBoundGrid1_QueryAllowDragColumnHeader(object sender, GridQueryDragColumnHeaderEventArgs e)
{
	int row, col;
	Point pt = this.gridDataBoundGrid1.PointToClient(Control.MousePosition);
	if(this.gridDataBoundGrid1.PointToRowCol(pt, out row, out col) && row == 1)
	{
		e.AllowDrag = false;
	}
}


AD Administrator Syncfusion Team November 23, 2005 01:35 PM UTC

you''re right it works fine thanks Clark

Loader.
Live Chat Icon For mobile
Up arrow icon