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.
Syncfusion Feedback

GridDataControl errors on sort

Thread ID:

Created:

Updated:

Platform:

Replies:

96301 Sep 3,2010 01:47 PM UTC Sep 7,2010 01:05 PM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: GridGroupingControl
Bill Blair
Asked On September 3, 2010 01:47 PM UTC

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_2e1667a3.rar

Muthulakshmi N [Syncfusion]
Replied On September 7, 2010 01:05 PM UTC

Hi Blair,

We have checked with our sample as per your request, We are afraid that we were unable to reproduce the issue with “sorting the column header of GridDataControl” which implements INotifyPropertyChanged . Here we have attached a sample for your reference.

Please download the sample from the following location.

Link: http://www.syncfusion.com/uploads/redirect.aspx?file=GDCupdatedata_f2dbd956.zip&team=development

Could you please modify the sample to reproduce the issue.

Let us know if you need any details.

Regards,
Muthulakshmi



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

;