I mark some properties with Display.Order attribute.
When I'm using AutoGenerateColumns=false and set the column in my prefered order I got an excaption and the application crashe.
It big issue because it prevent me to use costom filter controls, or every column specific feature.
The controles ver is: RadControls_for_Silverlight4_RC_DEV
Error:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; OfficeLiveConnector.1.4; OfficeLivePatch.1.3; .NET4.0C; .NET4.0E)
Timestamp: Thu, 8 Apr 2010 09:00:46 UTC
Message: Unhandled Error in Silverlight Application GridViewDataControl_DuplicateDisplayIndex at Telerik.Windows.Controls.GridViewColumnCollectionInternal.InitializeDisplayIndexMap()
at Telerik.Windows.Controls.GridView.GridViewDataControl.InitializeDisplayIndex()
at Telerik.Windows.Controls.GridView.GridViewDataControl.RefreshColumns()
at Telerik.Windows.Controls.GridView.GridViewDataControl.OnItemsPropertyChanged(Object sender, PropertyChangedEventArgs e)
at Telerik.Windows.Data.DataItemCollection.RaisePropertyChanged(PropertyChangedEventArgs args)
at Telerik.Windows.Data.DataItemCollection.set_CollectionView(QueryableCollectionView value)
at Telerik.Windows.Data.DataItemCollection.CreateCollectionView(IEnumerable source)
at Telerik.Windows.Data.DataItemCollection.SetItemsSource(IEnumerable source)
at Telerik.Windows.Controls.GridView.GridViewDataControl.<>c__DisplayClass45.<Bind>b__44()
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.OnEmptySourceCollectionViewCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at System.Windows.Controls.DomainDataSourceView.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Windows.Controls.DomainDataSourceView.OnCollectionViewCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at System.Windows.Controls.EntityCollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
at System.Windows.Controls.PagedEntityCollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
at System.Windows.Controls.PagedEntityCollectionView.CompletePageMove(Int32 pageIndex)
at System.Windows.Controls.PagedEntityCollectionView.<.ctor>b__0(Object sender, EventArgs args)
at System.Windows.Controls.PagedEntityCollection.NotifyPageChanged(Int32 startPageIndex, Int32 pageIndex)
at System.Windows.Controls.DomainDataSource.DomainContext_Loaded(LoadedDataEventArgs e, LoadContext loadContext)
at System.Windows.Controls.DomainDataSource.LoadData_Callback(LoadOperation loadOperation)
at System.ServiceModel.DomainServices.Client.LoadOperation.<>c__DisplayClass4`1.<Create>b__0(LoadOperation`1 arg)
at System.ServiceModel.DomainServices.Client.LoadOperation`1.InvokeCompleteAction()
at System.ServiceModel.DomainServices.Client.OperationBase.Complete(Object result)
at System.ServiceModel.DomainServices.Client.LoadOperation.Complete(DomainClientResult result)
at System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult asyncResult)
at System.ServiceModel.DomainServices.Client.DomainContext.<>c__DisplayClass1b.<Load>b__17(Object )
Line: 1
Char: 1
Code: 0
Message: Unhandled Error in Silverlight Application
Code: 4004
Category: ManagedRuntimeError
Message: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at System.Collections.Generic.List`1.get_Item(Int32 index)
at Telerik.Windows.Controls.GridViewColumnCollectionInternal.ColumnFromDisplayIndex(Int32 displayIndex)
at Telerik.Windows.Controls.GridView.GridViewDataControl.ColumnFromDisplayIndex(Int32 displayIndex)
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.DetermineRealizedColumnsBlockList(Size constraint)
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)
Line: 56
Char: 13
Code: 0