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

GridSorting with bound Childdata

0 Answers 86 Views
GridView
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 16 Jun 2015, 02:04 PM

Hi guys,

 we're using RadGrid with EntityCollection bounded ItemsSource.

One column of the grid is bound to a child entity of that collection. I am getting an error, while click on the header of that column (sorting).

Is there a workaround?

Der Typ "KlientBankEntityCollection" besitzt keine Eigenschaft mit dem Namen "Bank.BankName", weshalb die Datensammlung nicht sortiert werden kann. in PresentationFramework (type xyz has no property named xyz2, so data can not be sorted)

bei System.Windows.Data.BindingListCollectionView.ConvertSortDescriptionCollection(SortDescriptionCollection sorts) 
bei System.Windows.Data.BindingListCollectionView.RefreshOverride() 
bei System.Windows.Data.CollectionView.RefreshInternal() 
bei System.Windows.Data.CollectionView.RefreshOrDefer() 
bei System.Windows.Data.BindingListCollectionView.SortDescriptionsChanged(Object sender, NotifyCollectionChangedEventArgs e) 
bei System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e) 
bei System.ComponentModel.SortDescriptionCollection.OnCollectionChanged(NotifyCollectionChangedAction action, Object item, Int32 index) 
bei System.ComponentModel.SortDescriptionCollection.InsertItem(Int32 index, SortDescription item) 
bei System.Windows.Data.BindingListCollectionView.BindingListSortDescriptionCollection.InsertItem(Int32 index, SortDescription item) 
bei System.Collections.ObjectModel.Collection`1.Insert(Int32 index, T item) 
bei System.Collections.ObjectModel.Collection`1.System.Collections.IList.Insert(Int32 index, Object value) 
bei Telerik.Windows.Data.CollectionHelper.Insert(IList target, IEnumerable newItems, Int32 startingIndex, IEqualityComparer itemComparer) 
bei Telerik.Windows.Data.ObservableCollectionManager.HandleCollectionChanged(IList sender, NotifyCollectionChangedEventArgs args) 
bei Telerik.Windows.Data.ObservableCollectionManager.Telerik.Windows.Data.IWeakEventListener.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs args) 
bei Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args) 
bei System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e) 
bei System.ComponentModel.SortDescriptionCollection.OnCollectionChanged(NotifyCollectionChangedAction action, Object item, Int32 index) 
bei System.ComponentModel.SortDescriptionCollection.InsertItem(Int32 index, SortDescription item) 
bei System.Collections.ObjectModel.Collection`1.Insert(Int32 index, T item) 
bei System.Collections.ObjectModel.Collection`1.System.Collections.IList.Insert(Int32 index, Object value) 
bei Telerik.Windows.Data.CollectionHelper.Insert(IList target, IEnumerable newItems, Int32 startingIndex, IEqualityComparer itemComparer) 
bei Telerik.Windows.Data.CollectionHelper.Reset(IEnumerable source, IList target, Func`2 itemConverter) 
bei Telerik.Windows.Data.ObservableCollectionManager.HandleCollectionChanged(IList sender, NotifyCollectionChangedEventArgs args) 
bei Telerik.Windows.Data.ObservableCollectionManager.Telerik.Windows.Data.IWeakEventListener.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs args) 
bei Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args) 
bei System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e) 
bei System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) 
bei Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) 
bei Telerik.Windows.Data.RadObservableCollection`1.ResumeNotifications() 
bei Telerik.Windows.Controls.GridView.GridViewDataControl.PerformSorting(GridViewSortingEventArgs sortingArgs) 
bei Telerik.Windows.Controls.GridView.GridViewDataControl.<>c__DisplayClass9b.b__9a() 
bei Telerik.Windows.Controls.CursorManager.PerformTimeConsumingOperation(FrameworkElement frameworkElement, Action action) 
bei Telerik.Windows.Controls.GridView.GridViewDataControl.Sort(GridViewColumn column, Boolean appendToExisting) 
bei Telerik.Windows.Controls.GridView.GridViewHeaderCell.RequestSort(Boolean appendToExisting) 
bei Telerik.Windows.Controls.GridView.GridViewHeaderCell.PerformUserSort() 
bei Telerik.Windows.Controls.GridView.GridViewHeaderCell.OnMouseLeftButtonUp(MouseButtonEventArgs e) 
bei System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e) 
bei System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) 
bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) 
bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) 
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) 
bei System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent) 
bei System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e) 
bei System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) 
bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) 
bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) 
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) 
bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) 
bei System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) 
bei System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted) 
bei System.Windows.Input.InputManager.ProcessStagingArea() 
bei System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) 
bei System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) 
bei System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) 
bei System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 
bei System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 
bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 
bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) 
bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) 
bei MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

 

Thanks,

 

David

No answers yet. Maybe you can help?

Tags
GridView
Asked by
David
Top achievements
Rank 1
Share this question
or