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.
Unfortunately, activation email could not send to your email. Please try again.

Filtering problems

Thread ID:





48490 Aug 29,2006 09:33 AM Oct 6,2006 05:41 AM Windows Forms 3
Tags: GridControl
Konstantin Babiy
Asked On August 29, 2006 09:33 AM


I have found some problems when using filtering in GridGroupingControl:

when adding filter on a column and then removing it (selecting "All" filtering menu item) table doesn''t show all it''s rows, it shows records of a previous filter. Manually it could be only fixed when resizing row heights. How could I fix it programatically?

Thank you for answering.

Administrator [Syncfusion]
Replied On August 30, 2006 04:21 AM

Hi Konstantin,

I have created a sample as per your specification. Attached sample works fine with the record filters in a GroupingGrid.

Here is a sample.

If you can send us a sample that does not work, we can try to debug it here.


Replied On October 5, 2006 11:08 AM


Your sample is not usefull.
After I call TableDescriptor.RecordFilters.Remove method filter cell text is not set to "(All)". It
retain the previous selected value.

I use custom FilterBar renderer. But a have no chance to access it''s control text or refresh it. TableControl.GetCellRenderer returns renderer instance not actualy assigned with request position.

I wonder, why it happens? And explain, please, the way to avoid this problem.

Administrator [Syncfusion]
Replied On October 6, 2006 05:41 AM

Hi Nikolaj,

By default, The Filterbar cell doesn''t show the "(All)" and "(Empty)" options in a grid. But you do this by derving the GridFilterBarCellRenderer and override the OnDraw method to draw the filterbar cell with All options.

protected override void OnDraw(Graphics g, Rectangle clientRectangle, int rowIndex, int colIndex, GridStyleInfo style)
if( ListBoxPart != null )
style.CellValue = ListBoxPart.SelectedItem;
base.OnDraw (g, clientRectangle, rowIndex, colIndex, style);
style.CellValue = GridFilterBarText(style);

You can use the ListBoxPart.SelecteItem property of the GridFilterBarCellRenderer to get the selected value(control text) in the GridFilterBarCell in a grid. Below is a code snippet.

private void gridTableControlCurrentCellCloseDropDown(object sender, GridTableControlPopupClosedEventArgs e)
GridTableFilterBarCellRenderer cr = this.grid.TableControl.CellRenderers["FilterBarCell"] as GridTableFilterBarCellRenderer;
if( cr != null)
Console.WriteLine( " SelectedItem : " + cr.ListBoxPart.SelectedItem );

Please refer to this KB article for customize the filterbar entry in a grid.

Best Regards,


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.

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.