Currently I am facing an issue (stack overflow exception) while sorting the column in XamGrid. I have tried debugging infragistics code (Infragistics.WPF.DataManager.DataManager.cs) and observed that there is a circular execution which is happening while sorting the column when XamGrid reloads again. Due to this we are getting Stack overflow exception. XamGrid ItemSource is of type ICollectionView. The build version is 16.1.20161.2056. Any inputs on this is really appreciated. Thanks for your support. Please let me know if you need any further details.
We logged a development issue to fix this issue. Issue "234493: StackOverflow exception is thrown when sorting an empty grid prior to loading CollectionView and ObservableCollection of objects." has been addressed in service release versions and future releases
WPF_16.2.20162.2109
WPF_16.1.20161.2231.
Hello Shashikanth,
Thank you for following up. We fixed one issue, before the patch 2056. However I found another occurance regarding same issue. Because you can reproduce this exception when the data source changes I believe we are seeing the same issue. I've attached a call stack, it mentions OnDataSourceCollectionChanged. Please let me know if yours is similar.
Please provide the code you are handling when you reload the grid. I'd like to tweak my project to match your scenario. If you'd like to modify my sample to isolate and reproduce the behavior you are encountering I'd greatly appreciate it.
Steps to reproduce the issue in the sample attached above:
1. Sort/click "Text" field2. Click "Add" button3. Sort/click "Text" field
I have created a private case to continue our discussion with ID CAS-182375-N1J1W6. You could reach your case following the link bellow:
https://ko.infragistics.com/my-account/support-activity I will update you via the mentioned case, so if you have any further questions or comments please update your case.
Let me know if you have any questions.
Thanks Michael for your prompt response. Did you mean this issue is already addressed in build 16.1.20161.2056? However I am not getting any exceptions in your sample application shared with the same build. It is difficult for me to explain the scenario which is occurring this exception but however I will try to share it in the sample application.
In my case this is happening when I reload the screen and then sort the column it is causing stack overflow exception. FYI, I am not adding any records from my application when I reload the grid second time. Can the call stack information of Infragistics will be helpful to you? As per my observations after debugging the code I noticed that DataSourceCollectionChanged event has a circular execution. For the XamGrid, GroupBy is enabled with settings AllowGroupByArea as Hidden and GroupByOperation as MergeCells. Please let me know in case you need XAML of XamGrid.
Thank you for contacting Infragistics. We recently addressed a similar issue in the past where this exception was thrown after adding records then immediately sorting. However after testing the build you are using I only see the exception occur if I sort a colum, add records, then sort again.
Please review my sample attached and confirm how you encounter the exception. If I do not hear back from you today I will log the development issue how I discovered it and create a private case ticket for you.