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

[Solved] Problem with sorting (latest builds)

2 Answers 100 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
boris
Top achievements
Rank 1
boris asked on 31 Dec 2009, 10:29 AM
Hello,
I am doing server side sorting with RadGridView, and I have noticed that with the latest internal builds I get "Unable to cast" exception.
Here is my scenario:
I have 74 columns, my grid is bound to a IEnumerable (two way binding).
At first, if I try sort, all is well, but if I try to scroll horizontally, and then do sort, I get this exception:

Message: Specified cast is not valid.

Stack Trace:    at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
   at MS.Internal.XcpImports.MethodEx(DependencyObject obj, String name)
   at MS.Internal.XcpImports.UIElement_UpdateLayout(UIElement element)
   at System.Windows.UIElement.UpdateLayout()
   at Telerik.Windows.Controls.GridView.GridViewDataControl.ItemsSourceChanged(Boolean sourceChanged)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.OnItemsChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Controls.GridView.BaseItemsControl.OnItemCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.DataItemCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.DataItemCollection.SetItemsSource(IEnumerable source)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.<>c__DisplayClass47.<Bind>b__46()
   at Telerik.Windows.Controls.CursorManager.PerformTimeConsumingOperation(FrameworkElement frameworkElement, Action action)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.Bind(Object newValue)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.OnItemsSourceChanged(Object oldValue, Object newValue)
   at Telerik.Windows.Controls.DataControl.OnItemsSourcePropertyChanged(DependencyObject origin, DependencyPropertyChangedEventArgs args)
   at Telerik.Windows.PropertyMetadata.<>c__DisplayClass1.<Create>b__0(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.RefreshExpression(DependencyProperty dp)
   at System.Windows.Data.BindingExpression.RefreshExpression()
   at System.Windows.Data.BindingExpression.SendDataToTarget()
   at System.Windows.Data.BindingExpression.SourcePropertyChanged(PropertyPathListener sender, PropertyPathChangedEventArgs args)
   at System.Windows.PropertyPathListener.RaisePropertyPathStepChanged(PropertyPathStep source)
   at System.Windows.PropertyAccessPathStep.RaisePropertyPathStepChanged(PropertyListener source)
   at System.Windows.CLRPropertyListener.SourcePropertyChanged(Object sender, PropertyChangedEventArgs args)
   at System.Windows.Data.WeakPropertyChangedListener.PropertyChangedCallback(Object sender, PropertyChangedEventArgs args)
   at System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
   at OnGuard.DCMS.FrontEnd.Library.SL.ViewModel.ViewModelBase.OnPropertyChanged(String propertyName)
   at OnGuard.DCMS.FrontEnd.Library.SL.ViewModel.ListScreenGridViewModel.dts_GetGridDataCompleted(Object sender, GetGridDataCompletedEventArgs e)
   at OnGuard.DCMS.FrontEnd.Library.SL.ServiceClients.DisplayTemplateServiceClient.OnGetGridDataCompleted(Object state)



I have noticed this problem in Version 2009.3.1208.1030, and a problem still exists in Version 2009.3.1219.1030.
  

2 Answers, 1 is accepted

Sort by
0
Stefan Dobrev
Telerik team
answered on 04 Jan 2010, 09:15 AM
Hello Boris,

I have tried to replicate your scenario but everything works fine on my side. Can you please open a support ticket and send us a sample solution that illustrates this problem?

Kind regards,
Stefan Dobrev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
boris
Top achievements
Rank 1
answered on 04 Jan 2010, 03:30 PM
Hi Stefan, 
That is a bit problematic, I already tried to build a small demo since I have posted this, I did a little "server side" sort simulation, but i cannot reproduce it either.. :S
I reverted to old builds for now, they work OK for me, but I will have to find some solution in the future...
Tags
GridView
Asked by
boris
Top achievements
Rank 1
Answers by
Stefan Dobrev
Telerik team
boris
Top achievements
Rank 1
Share this question
or