Home Forums WPF controls Xceed DataGrid for WPF Two grids bound to the same source

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #24845 |

    Hello. I have an error and don’t know if it’s a bug or if I’m doing something wrong.

    – I have two grids bound to the same data source (a DataTable).
    – Each grid has its own DataGridCollectionViewSource.
    – One of the view sources has a filter so it doesn’t select all the rows.
    – They also select different columns of the underlying DataTable.

    When I change the value of any column of a row that appears in the first grid but not in the other (because it doesn’t pass the filter), I get a NullReferenceException, with the following stack trace.

    Is this an adequate approach? Should I do someting special for this case to work?

    en Xceed.Wpf.DataGrid.DataGridCollectionView.ReplaceSourceItem(Int32 oldStartIndex, IList oldItems, Int32 newStartIndex, IList newItems)
    en Xceed.Wpf.DataGrid.DataGridCollectionView.BindingList_ListChanged(Object sender, ListChangedEventArgs e)
    en Xceed.Wpf.DataGrid.DataGridCollectionView.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
    en System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
    en System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
    en Xceed.Utils.Collections.ListChangedEventManager.OnListChanged(Object sender, ListChangedEventArgs args)
    en System.Data.DataView.OnListChanged(ListChangedEventArgs e)
    en System.Data.DataView.IndexListChanged(Object sender, ListChangedEventArgs e)
    en System.Data.DataViewListener.IndexListChanged(Object sender, ListChangedEventArgs e)
    en System.Data.Index.OnListChanged(ListChangedType changedType, Int32 newIndex, Int32 oldIndex)
    en System.Data.Index.RecordStateChanged(Int32 oldRecord, DataViewRowState oldOldState, DataViewRowState oldNewState, Int32 newRecord, DataViewRowState newOldState, DataViewRowState newNewState)
    en System.Data.DataTable.RecordStateChanged(Int32 record1, DataViewRowState oldState1, DataViewRowState newState1, Int32 record2, DataViewRowState oldState2, DataViewRowState newState2)
    en System.Data.DataTable.SetNewRecordWorker(DataRow row, Int32 proposedRecord, DataRowAction action, Boolean isInMerge, Int32 position, Boolean fireEvent, Exception& deferredException)
    en System.Data.DataTable.SetNewRecord(DataRow row, Int32 proposedRecord, DataRowAction action, Boolean isInMerge, Boolean fireEvent)
    en System.Data.DataRow.EndEdit()
    en Xceed.Wpf.DataGrid.DataRowEditableWrapper.EndEdit()
    en Xceed.Wpf.DataGrid.DataRow.EndEdit()
    (…)

    Imported from legacy forums. Posted by Andrés (had 519 views)

    Xceed Support
    Member
    Post count: 5658

    Hi,

    Just to let you know that we have been able to reproduce this issue and that a fix will be present in the next version to resolve this.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 226 views)

    User (Old forums)
    Member
    Post count: 23064

    Ok, thanks. But I have two questions: Do you know when will you have the next version? Is there any workaround until then?

    Imported from legacy forums. Posted by Andrés (had 200 views)

    Xceed Support
    Member
    Post count: 5658

    Unfortunately the answer is no to both question.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 3743 views)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.