Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
4970
Error Drag and drop colum for grouping
posted

Set up grouping for xamgrid in xaml:

<ig:XamGrid.GroupBySettings>
        <ig:GroupBySettings AllowGroupByArea="Top" />
    </ig:XamGrid.GroupBySettings>

then run the app and try to drap and drop column header to group area, very often, got following error:

unable to cast object of type 'Infrigistics.Controls.Grids.Row' to type 'Infrisgistics.Controls.Primitives.GroupByRow'.
 at Infragistics.Controls.Grids.XamGrid.WalkDownGroupByRowsForDataItem(RowCollection rows, Object data)
   at Infragistics.Controls.Grids.XamGrid.ActiveItemChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
   at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
   at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet)
   at Infragistics.Controls.Grids.XamGridRowsManager.OnCurrentItemChanged(Object data)
   at Infragistics.Controls.Grids.RowsManager.DataManager_CurrentItemChanged(Object sender, CurrentItemEventArgs e)
   at Infragistics.DataManagerBase.OnCurrentItemChanged(Object item)
   at Infragistics.DataManagerBase.ICollectionViewData_CurrentChanged(Object sender, EventArgs e)
   at System.Windows.Data.PagedCollectionView.OnCurrentChanged()
   at System.Windows.Data.PagedCollectionView.RaiseCurrencyChanges(Boolean fireChangedEvent, Object oldCurrentItem, Int32 oldCurrentPosition, Boolean oldIsCurrentBeforeFirst, Boolean oldIsCurrentAfterLast)
   at System.Windows.Data.PagedCollectionView.RefreshOverride()
   at System.Windows.Data.PagedCollectionView.Refresh()
   at System.Windows.Data.PagedCollectionView.EndDefer()
   at System.Windows.Data.PagedCollectionView.DeferHelper.Dispose()
   at Infragistics.DataManager`1.ResolveFilteredSortedPagedDataSource()
   at Infragistics.DataManagerBase.InvalidateSortedFilterdDataSource()
   at Infragistics.DataManagerBase.ClearCachedDataSource(Boolean invalidateTotalRowCount)
   at Infragistics.DataManager`1.ClearCachedDataSource(Boolean invalidateTotalRowCount)
   at Infragistics.Controls.Grids.RowsManager.InvalidateSort()
   at Infragistics.Controls.Grids.RowsManager.InvalidateGroupBy(Boolean reset)
   at Infragistics.Controls.Grids.XamGridRowsManager.InvalidateGroupBy(Boolean reset)
   at Infragistics.Controls.Grids.RowsManager.OnColumnLayoutPropertyChanged(ColumnLayout layout, String propertyName)
   at Infragistics.Controls.Grids.XamGridRowsManager.OnColumnLayoutPropertyChanged(ColumnLayout layout, String propertyName)
   at Infragistics.Controls.Grids.RowsManagerBase.OnColumnLayoutPropertyChanged(Object sender, PropertyChangedEventArgs e)
   at System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
   at Infragistics.DependencyObjectNotifier.OnPropertyChanged(String propertyName)
   at Infragistics.Controls.Grids.ColumnLayout.InvalidateGroupBy()
   at Infragistics.Controls.Grids.GroupByColumnsCollection.OnGroupingChanged(IList`1 oldCollection, IList`1 newCollection)
   at Infragistics.Controls.Grids.GroupByColumnsCollection.AddItem(Int32 index, Column item)
   at Infragistics.Collections.CollectionBase`1.Add(T item)
   at Infragistics.Controls.Grids.Column.set_IsGroupBy(Boolean value)
   at Infragistics.Controls.Grids.Primitives.HeaderCellControl.OnMouseLeftButtonUpColumnMoving(MouseButtonEventArgs e)
   at Infragistics.Controls.Grids.Primitives.CellControlBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventNam

how to resolve this problem.