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

Filtering problems

Thread ID:

Created:

Updated:

Platform:

Replies:

48490 Aug 29,2006 01:33 PM UTC Oct 6,2006 09:41 AM UTC WinForms 3
loading
Tags: GridControl
Konstantin Babiy
Asked On August 29, 2006 01:33 PM UTC

ПРЕВЕД УЧАСНЕГИ

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 08:21 AM UTC

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.
http://www.syncfusion.com/Support/user/uploads/Filter_1a20972d.zip

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

Regards,
Haneef

N
Replied On October 5, 2006 03:08 PM UTC

КРАСАВЧЕГИ !

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 09:41 AM UTC

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.
http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=323

Best Regards,
Haneef

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

;