Facing problem with date filter for a Dynamic RadViewControl

1 posts, 0 answers
  1. Raj Yennam
    Raj Yennam avatar
    28 posts
    Member since:
    Jul 2012

    Posted 04 Jan 2013 Link to this post

    Hi,

    We have a RadGridView control and at run time we are binding data to this grid through an observablecollection. The observablecollection collection filled data from a Dictionary<string,object>. Data displaying properly with out any issue. At run time i am applying the filters to all the fileds.

    On column is having value as date. Fo this filed i am applying a custom date filter. Filter is applying propery without any issue at rum time
    but while filtering the data i am getting an exception like:
     
    System.ArgumentException was unhandled by user code
      Message=The value "( (Application_Date IsGreaterThanOrEqualTo 1/17/2013 ) AND (Application_Date IsLessThanOrEqualTo 1/17/2013 ) )" is not of type "Telerik.Windows.Data.IFilterDescriptor" and cannot be used in this generic collection.
    Parameter name: value
      StackTrace:
           at System.ThrowHelper.ThrowWrongValueTypeArgumentException(Object value, Type targetType)
           at System.Collections.ObjectModel.Collection`1.System.Collections.IList.Insert(Int32 index, Object value)
           at Telerik.Windows.Data.CollectionHelper.Insert(IList target, IEnumerable newItems, Int32 startingIndex, IEqualityComparer itemComparer)
           at Telerik.Windows.Data.ObservableCollectionManager.HandleCollectionChanged(IList sender, NotifyCollectionChangedEventArgs args)
           at Telerik.Windows.Data.ObservableCollectionManager.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs args)
           at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
           at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
           at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
           at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
           at Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
           at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
           at Telerik.Windows.Data.RadObservableCollection`1.InsertItem(Int32 index, T item)
           at Telerik.Windows.Data.FilterDescriptorCollection.InsertItem(Int32 index, IFilterDescriptor item)
           at System.Collections.ObjectModel.Collection`1.Add(T item)
           at TelStrat.Controls.DateRangeFilterControl.FilterGridRecords()
           at TelStrat.Controls.DateRangeFilterControl.OnFilter(Object sender, RoutedEventArgs e)
           at TelStrat.Controls.DateRangeFilterControl.rbDateFilter_SelectionChanged(Object sender, SelectionChangedEventArgs e)
      InnerException:
    Please suggest.

    Adv Thanks & Regards,
    Bijay
Back to Top