Welcome to the Xceed Community | Help
Community Search  
More Search Options

Grid.Columns.Remove() is crashing

Sort Posts: Previous Next
  •  06-29-2012, 4:59 AM Post no. 32319

    Grid.Columns.Remove() is crashing

    Hi,

    I am using Licensed Xceed grid from long time. 

    I have a parent grid and Child grid which are related to each other. Based on the selected row in parent grid, child grid columns will be changing.

    So I am dynamically adding and removing columns in child grid (in selection Changed event of parent ).

    When i am trying to removing columns in child grid, some times it is crashing with object reference error with stack trace

       at Xceed.Wpf.DataGrid.Views.VirtualizingFixedCellSubPanel.MeasureOverride(Size constraint)

       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)

       at System.Windows.UIElement.Measure(Size availableSize)

       at System.Windows.ContextLayoutManager.UpdateLayout()

       at Xceed.Wpf.DataGrid.Views.FixedCellPanel.Xceed.Wpf.DataGrid.Views.IVirtualizingCellsHost.BringIntoView(Cell cell)

       at Xceed.Wpf.DataGrid.VirtualizingCellCollection.OnCellRequestBringIntoView(Object sender, RequestBringIntoViewEventArgs e)

       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)

       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

       at System.Windows.FrameworkElement.BringIntoView(Rect targetRectangle)

       at System.Windows.FrameworkElement.BringIntoView()

       at Xceed.Wpf.DataGrid.DataGridContext.SetCurrent(Object item, Row containerRow, Nullable`1 sourceDataItemIndex, ColumnBase column, Boolean forceFocus, Boolean isCancelable, Boolean synchronizeSelectionWithCurrent)

       at Xceed.Wpf.DataGrid.DataGridContext.SetCurrentColumnCore(ColumnBase column, Boolean isCancelable, Boolean synchronizeSelectionWithCurrent)

       at Xceed.Wpf.DataGrid.DataGridContext.HandleMasterColumnsCollectionChanged(NotifyCollectionChangedEventArgs e)

       at Xceed.Wpf.DataGrid.DataGridContext.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)

       at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)

       at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)

       at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)

       at Xceed.Wpf.DataGrid.ColumnCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e)

       at Xceed.Wpf.DataGrid.ColumnCollection.RemoveItem(Int32 index)

       at System.Collections.ObjectModel.Collection`1.Remove(T item)

       at Aveva.Mars.Core.Controls.DataGrid.SynchronizeColumnsDown(IList newItems, IList oldItems) in D:\Development\10.2\erm\net\Aveva.Mars.Core\Source\Controls\DataGrid\DataGrid.Columns.cs:line 86

       at Aveva.Mars.Core.Controls.DataGrid.ColumnsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) in D:\Development\10.2\erm\net\Aveva.Mars.Core\Source\Controls\DataGrid\DataGrid.Columns.cs:line 64

       at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)

       at System.Collections.ObjectModel.Collection`1.Remove(T item)

     

    Can some one  help me regarding  this.(what might be the cause behind this crash)

     

    Filed under:
  •  07-05-2012, 9:48 AM Post no. 32348 in reply to 32319

    Re: Grid.Columns.Remove() is crashing

    Hi Sai Sunil,

    Which version of the component are you currently using? If it is not the latest one (build 12267), please download the latest one from our updates center to test with to see if that resolves the issue.

     Updates Center: www.xceed.com/updates

    If the issue is still there, then we would need a small stand-alone test project that reproduces the issue in order to investigate further. Please send it to support@xceed.com with a link to this forum thread for reference. Thank you.

     


    ** Quick Tip: Clients with an active support subscription should be sending their questions by email if they wish to benefit from the faster response time. Thanks!


    Diane Lafontaine
    Technical Support
    Xceed Software Inc.
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.