This is a migrated thread and some comments may be shown as answers.

FilterDescriptor Issue

3 Answers 95 Views
DomainDataSource
This is a migrated thread and some comments may be shown as answers.
Stanescu Mihai
Top achievements
Rank 1
Stanescu Mihai asked on 28 Mar 2011, 09:52 AM
Hello,

I seem to have a problem with filterdescriptors, the issue is this:

I want to add two filters for a QDSCV, which will filter the creationdate of the records of type DateTime, have 1 set to GreaterThan the first day of the month and 1 set to LessThan the last day of the month. At this moment I only have records for the current month. When i filter for other months than the current one, nothing is displayed which is what i expect, but when i want to filter for the current month i get the following error: 

Message: Unhandled Error in Silverlight Application 
Code: 4004    
Category: ManagedRuntimeError       
Message: System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Telerik.Windows.Controls.GridView.IndexTree.Set(Int32 index, Double value)
   at Telerik.Windows.Controls.GridView.IndexTree.set_Item(Int32 index, Double value)
   at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)     
T
he filterdescriptors value are set from a combo box and i checked in debug mode to see if the values are correct and they are. Further more, when it loads for the first time it loads correctly, only after i choose a different month and then go back to the current one it happens.

Edit: Found the problem, but don't know how to resolve it. If i leave the filter which checks IsGreaterThanOrEqualTo, it works fine. If I leave the other, IsLessThanOrEqualTo it fails with the above error. Will keep posting if I have more news.

3 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 28 Mar 2011, 11:58 AM
Hi Stanescu Mihai,

Unfortunately, we are not able to determine what is going on from the information that you have provided.

Best wishes,
Ross
the Telerik team
0
Stanescu Mihai
Top achievements
Rank 1
answered on 28 Mar 2011, 02:23 PM
Update. I think i narrowed it down.
This happens only when I filter out all the records and then remove the filter(s).
Tried it with a Contains operator this time. If I add the filter and some records appear, then I can remove the filter with no problems. But if the filter removes all the records then when I remove the filter it will crash.


Fixed, with a not so MVVM approach. Still hope for a better approach.
On the Loaded event I reset the ItemsSource of the RadGridView to the collection.
0
Rossen Hristov
Telerik team
answered on 29 Mar 2011, 12:38 PM
Hi Stanescu Mihai,

Can you open a separate support ticket and attach a sample project that reproduces this behavior.

We need something that we can run and debug in order to identify the cause for this behavior.

We are looking forward to hearing from you.

Best wishes,

Ross
the Telerik team
Tags
DomainDataSource
Asked by
Stanescu Mihai
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Stanescu Mihai
Top achievements
Rank 1
Share this question
or