Home - Forums-.NET - FlyGrid.Net (Windows Forms) - Filter problem

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

Filter problem
Link Posted: 10-Jul-2006 05:39
I get Failed to compare two elements in the array when trying to filter a simple text column.

************** Exception Text **************
System.InvalidOperationException: Failed to compare two elements in the array. ---> System.ArgumentException: Object must be of type String.
   at System.String.CompareTo(Object value)
   at System.Collections.Comparer.Compare(Object a, Object b)
   at System.Array.GetPivotValue(IComparer comparer, Array keys, Int32 left, Int32 right)
   --- End of inner exception stack trace ---
Link Posted: 10-Jul-2006 05:57
Seems that this column contains not only string/text data.
Please check data on type before comparing to avoid this problem.
Link Posted: 10-Jul-2006 08:46
Solved it    ... Which event is fired when using the filter?
Link Posted: 10-Jul-2006 09:47
FlyGrid.ColumnFilterChanged event - Occurs when Filter of Column in the FlyGrid is changed.
FlyGrid.ColumnFilterValidate event - Occurs before filter list of the Column pop-ups to validate list of predefined filters.
Link Posted: 11-Jul-2006 07:55
For some reason when i use filter on a column in a grid that was populated like data = New Object() blabla it hangs up for a while for a few seconds and then applies the filter, although the grid.Rows.Items.Count stays the same as it was before the filter.

On grids populated with .DataSource = objDataset all works well, very fast, and grids total items count changes as it should when the filter is applied.
Link Posted: 11-Jul-2006 10:00
Can you provide us with a sample that demonstrates problem?
Please send (and zip, please) your sample to