FilterDescriptor Issue

4 posts, 0 answers
  1. Stanescu Mihai
    Stanescu Mihai avatar
    33 posts
    Member since:
    Aug 2009

    Posted 28 Mar 2011 Link to this post

    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.

  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 28 Mar 2011 Link to this post

    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
  3. DevCraft banner
  4. Stanescu Mihai
    Stanescu Mihai avatar
    33 posts
    Member since:
    Aug 2009

    Posted 28 Mar 2011 Link to this post

    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.
  5. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 29 Mar 2011 Link to this post

    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
Back to Top