Dynamic Binding Filtering Issue

2 posts, 0 answers
  1. Liyo
    Liyo avatar
    4 posts
    Member since:
    Jun 2011

    Posted 17 Sep 2013 Link to this post

    I have i have bind my grid to a dynamic object. I am getting following error file i try to filter the grid.


    Message: System.InvalidOperationException: The result of the dynamic binding produced by the object with type 'Demo.MyDataRow' for the binder 'Telerik.Windows.Data.SimpleGetIndexBinder' needs at least one restriction.
       at System.Dynamic.DynamicMetaObjectBinder.Bind(Object[] args, ReadOnlyCollection`1 parameters, LabelTarget returnLabel)
       at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, Object[] args)
       at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
       at lambda_method(Closure , MyDataRow )
       at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
       at System.Linq.Enumerable.<DistinctIterator>d__81`1.MoveNext()
       at System.Linq.Enumerable.<TakeIterator>d__3a`1.MoveNext()
       at Telerik.Windows.Controls.GridView.DistinctValueViewModelCollection.AddRangeFromSource(IEnumerable source)
       at Telerik.Windows.Controls.GridView.DistinctValueViewModelCollection.SetSource(IEnumerable source)
       at Telerik.Windows.Controls.GridView.FilteringViewModel.RefreshDistinctValues()
       at Telerik.Windows.Controls.GridView.FilteringViewModel.Refresh()
       at Telerik.Windows.Controls.GridView.FilteringControl.Prepare(GridViewColumn columnToPrepare)
       at Telerik.Windows.Controls.GridView.FilteringDropDown.PrepareFilteringControl()
       at Telerik.Windows.Controls.GridView.FilteringDropDown.OnDropDownPopupOpened(Object sender, EventArgs e)
       at Telerik.Windows.Controls.AutoClosePopupWrapper.OnPopupOpened(Object sender, EventArgs e)
       at MS.Internal.CoreInvokeHandler.InvokeEventHandler(UInt32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
       at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)     



    Can anyone please help me on this.

    i have attached my solution at following path.
    http://sdrv.ms/1ekZ5D0


    Regards,
    Liyo Jose.
  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 17 Sep 2013 Link to this post

    Hi,

    Please, try to correctly override and implement the TryGetIndex and TrySetIndex methods (just as you have done with TryGetMember and TrySetMember) on your dynamic object since you are accessing the Cells through its indexer. Maybe this will help.

    Regards,
    Rossen Hristov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
Back to Top