GridDataControl errors on sort

I have bound the GridDataControl to an ObjectDataProvider like so:

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"
xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
xmlns:MarketFilter="clr-namespace:Chimera.MarketFilter" Loaded="WindowLoaded" >






x:Name="grid"
AutoPopulateColumns="True"
AutoPopulateRelations="False"
ShowAddNewRow="False"
ItemsSource="{Binding Source={StaticResource stocks}}"
ColumnSizer="Auto"
VisualStyle="Office14Silver"
Loaded="GridLoaded"
NotifyPropertyChanges="True" >




the MarketData class is attached. It inherits from ObservableCollection and contains a collection of the Stock class which implements INotifyPropertyChanged. This collection is updated by an event from DataFeed very quickly.

When I click on a column header and it sorts by that column it immediately throws:
A first chance exception of type 'System.InvalidOperationException' occurred in System.dll

Then in a bit:
A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll

The rows start to disappear and then the grid is empty.

If I turn off the updating then the problem goes away and I can sort fine off of the starting data.

The error doesn't seem to be coming from my update code, I put a break point in the catch and it never hit.

Seems like a threading issue where access to the ObservableCollection isn't locked.

Any ideas what is causing this?



sorter_a6faaf32.rar

1 Reply

JJ Jeraldes J Syncfusion Team September 7, 2010 01:11 PM UTC

Hi Bill,

Thank you for using Syncfusion products.

For your information, we would request you to follow the forum ID:#96301 for future clarification regarding this issue.

Let us know if you need any other details.

Regards,
Jeraldes J



Loader.
Up arrow icon