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

GridFilterBar Questions

Thread ID:





29439 May 25,2005 03:15 PM UTC May 25,2005 03:38 PM UTC WinForms 2
Tags: GridControl
Administrator [Syncfusion]
Asked On May 25, 2005 03:15 PM UTC

First, is it possible to have a filterbar not filter certain columns? So some columns in the grid will allow filtering while other columns in the same grid will not. Also I noticed that if I start entering a new record in a GDBG then before completing the record I change the filter in a column for which I haven''t entered data in the new row yet. The new row stays in the filtered selection, but if I try to click on the new row again I get an IndexOutOfRangeException. It appears that when going back to the newly created row, the grid is trying to use it''s index before the filter, which is then out of range after the filter is run. I assume this is a bug in the way the GDBG handles filtering, but in any case I need a way to work around it. Thanks

Administrator [Syncfusion]
Replied On May 25, 2005 03:36 PM UTC

1) Handle the FilterBarCreatingColumnHeader event. In the event handler, you can disallow filtering for a column. Searc for "don''t try filter these columns" in the GridFilterBar sample we ship. 2) You can avoid this problem by handling the CurrentCellMoving event and either cancel the changes or save them if you are clicking a filterbar cell.
private void gridDataBoundGrid1_CurrentCellMoving(object sender, GridCurrentCellMovingEventArgs e)
	if(this.gridDataBoundGrid1.Binder.IsAddNew &&
		this.gridDataBoundGrid1.CurrentCell.MoveToRowIndex == 1)
		// or maybe this.gridDataBoundGrid1.Binder.CancelEdit();

Administrator [Syncfusion]
Replied On May 25, 2005 03:38 PM UTC

Thank you for the very quick response.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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