Home - Forums-.NET - FlyGrid.Net (Windows Forms) - Filtering columns programmatically

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

Filtering columns programmatically
Link Posted: 24-Oct-2007 18:43
Is there a way to filter columns programmatically using the Column.Filter object? I tried setting the FilterString property but the grid didn't update. I am using the grid in unbound mode.

Code snippet…

_grid.Columns.Items[0].Filter.FilterString =  \"[Symbol] = 'ALS.AX'\"

Cheers,

Steve
Link Posted: 24-Oct-2007 19:22
Do you actually just need to use

FlyGrid.ApplyRowFilter(string filterString)

?
Link Posted: 25-Oct-2007 19:55
I think ApplyFilter only works when the grid is using data binding. I did find a work around using the following...

_announcedGrid.Columns.Items[0].Filter.Filters.Clear();    
FilterItem item = new FilterItem( instrument, FilterOperator.Or, ConditionOperator.Equals );        
_announcedGrid.Columns.Items[0].Filter.Filters.Add( item );
_announcedGrid.Columns.Items[0].Filter.FilterString = \"Symbol = 'BHP.AX'\";
_announcedGrid.Columns.Items[0].Filter.FilterMode = FilterMode.CustomString;
Link Posted: 29-Oct-2007 01:06
Welcome to the loser club.

Read my exasperations here : http://www.9rays.net/forums/viewtopic.php?t=1706

In short words - FlyGrid supports one only filtering condition in unbound mode and it should be equals, non equal, blank/non blank I believe.

And the support doesnt want to recognise it as a bug (because it involve some labour to fix it I think). Hence - no fix for this issue.

Either bind your grid or implement filtering on your own.
Link Posted: 29-Oct-2007 04:10
maxima,

shager's workaround works. FlyGrid support single-condition filters in unbound mode.
Link Posted: 29-Oct-2007 04:17
maxima
anyway, I agree with you that this should be implemented.
Link Posted: 30-Oct-2007 07:54
Is there any hope it could be done in 2007 or we are talking about more lenghty times?
Link Posted: 30-Oct-2007 08:21
I cannot promise.
There's LINQ (Language Integrated Query) .NET 3.5 feature to be supported by FlyGrid. This can be a good and fast replacement for old-fashion ADO-like string-parsed filters.