User (Old forums)MemberJuly 30, 2007 at 8:34 pmPost count: 23064
After modifying a record I tend to do a refresh on the grid to show the current state. This is because I need to exercise the Filter on the Grid again. However, I notice that I get an exception ONLY the first time through (1st time refresh) of
“Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index”
I’ve stepped through the code and the error doesn’t throw in the Filter method but IMMEDIATELY after it returns to the method and the Refresh call. What is odd is that after modify many records subsequent to this the error doesn;t return ?
Any ideas ?
Imported from legacy forums. Posted by Desmond (had 788 views)User (Old forums)MemberJuly 31, 2007 at 4:39 amPost count: 23064
It only throws an exception on the FIRST time that a result from a Filter method would set a row to be ‘e.Accepted = false;’ – in other words filter out…
Still ploughing on – would love to hear from any of you who have tried this filter mechanism – though to me its looking like a bug..
Imported from legacy forums. Posted by Desmond (had 509 views)Xceed SupportMemberAugust 10, 2007 at 9:45 amPost count: 5658
Could you provide the complete exception stack trace for this issue…
At the same time, we just release version 1.2, would it be possible to confirm if your problem is still present in the latest version (we might have fixed it already!)
Imported from legacy forums. Posted by Marcus [Xceed] (had 398 views)User (Old forums)MemberSeptember 2, 2007 at 1:43 amPost count: 23064
I’m having a similar problem with exceptions on filtering that occur sporadically. I haven’t determined the pattern yet. I’m using v1.2.
The same filter that throws this exception subsequently worked without a problem on the same data, in the same session/instance of the application.
In my case I’m setting Filter directly on the DataGridCollectionView which requires a boolean predicate with a signature like this: private bool FilterItem(object item).
My code invokes the filtering process like so: DataGridCollectionView.Filter = FilterItem;
I’m currently at a loss on this problem but wonder if it has something to do with the way filter ops can be deferred.
Here is a typical stack trace:
FilterRow_FilterRowChanged: Exception:Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
FilterRow_FilterRowChanged STACK TRACE: at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, Excepti
at Xceed.Wpf.DataGrid.DataGridCollectionViewGroup.GetRawItemAtGlobalSortedIndex(Int32 index)
at Xceed.Wpf.DataGrid.DataGridCollectionView.GetItemAt(Int32 index)
at Xceed.Wpf.DataGrid.DataGridCollectionView.AdjustCurrencyAfterReset(RawItem oldCurrentRawItem, Int32 oldCurrentPosition, Boolea
at Xceed.Wpf.DataGrid.DataGridCollectionView.ForceRefresh(Boolean sendResetNotification)
at Xceed.Wpf.DataGrid.DataGridCollectionView.set_Filter(Predicate`1 value)
at … (stack trace stops at the orgin point in my code for setting the filter …)
Imported from legacy forums. Posted by Richard (had 826 views)Xceed SupportMemberSeptember 4, 2007 at 9:08 amPost count: 5658
We have recently fixed an issue closely related to the stack trace you sent (in fact, it’s the exact same stack trace )…
You can expect a fix for this in the next service release.
Imported from legacy forums. Posted by Marcus [Xceed] (had 431 views)
- You must be logged in to reply to this topic.