Home Forums WinForms controls Xceed Grid for WinForms Help with an exception

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

    Wondering if any could give any advice about the source/solution for this exception.

    When adding the first data row to an empty grid, we get the following exception. If we close and reopen the grid, the row is added without an exception.

    System.InvalidOperationException: The data source of all the synchronized detail grids must have the same number of fields.
    at Xceed.Grid.DetailGrid.CheckDataBoundColumns()
    at Xceed.Grid.DetailGrid.DataManager_DataStructureChanged()
    at Xceed.Grid.DataManager.ForceDataBinding(Object dataSource, String dataMember, Boolean onlyWhenNotSameList, Boolean createDataRows)
    at Xceed.Grid.DetailGrid.OnContainingListChanged(IStructuredList oldContainingList)
    at Xceed.Grid.GroupBase.set_ContainingList(IStructuredList value)
    at Xceed.Grid.Collections.StructuredDetailGridList.OnInsertComplete(Int32 index, Object value)
    at Xceed.Utils.Collections.ListBase.InternalAdd(Object value)
    at Xceed.Grid.Collections.ReadOnlyDetailGridList.InternalAdd(DetailGrid grid)
    at Xceed.Grid.DetailGrid.CreateDetailGrids(DataRow dataRow, Boolean synchronizeDetailGrids)
    at Xceed.Grid.DetailGrid.DataManager_DataRowsChanged(DataRowsChangedEventArgs e)
    at Xceed.Grid.DataManager.InvokeOnDataRowsChanged(DataRowsChangedEventArgs e)
    at Xceed.Grid.DataManager.AddRowFromSourceNewIndex(Int32 index)
    at Xceed.Grid.DataManager.BindingList_ListChanged(Object sender, ListChangedEventArgs e)
    at System.ComponentModel.ListChangedEventHandler.Invoke(Object sender, ListChangedEventArgs e)

    Imported from legacy forums. Posted by Doug (had 2099 views)

    User (Old forums)
    Member
    Post count: 23064

    Normally, this is because you are using a data source for you DetailGrids that varies from one detail grid to another. You can set the GridControl.SynchronizeDetailGrids property to false in such a case.

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

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