Home Forums WinForms controls Xceed Grid for WinForms DetailGrid Exception

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

    I am trying to add a DetailGrid to my grid and I keep getting the following exception when I open the grid:

    System.NullReferenceException: Object reference not set to an instance of an object.
    at Xceed.Grid.DetailGrid.UpdateDetailGridTemplateBinding(DataRow dataRowSample)
    at Xceed.Grid.DetailGrid.UpdateDetailGridsOfMySelfAndSyncronizedChild()
    at Xceed.Grid.DetailGrid.DataManager_DataRowsChanged(DataRowsChangedEventArgs e)
    at Xceed.Grid.DataManager.InvokeOnDataRowsChanged(DataRowsChangedEventArgs e)
    at Xceed.Grid.DataManager.CreateDataRows()
    at Xceed.Grid.DataManager.ReadDataRows()
    at Xceed.Grid.GridControl.OnBindingContextChanged(EventArgs e)

    This occurs if I have the following code implemented in my main grid:

    DeltaGrid deltaGrid = new DeltaGrid ();
    this.DetailGridTemplates.Add (deltaGrid);

    If these lines are commented out, the grid opens fine.

    I have simplified the DeltaGrid as much as I can think to, and it still doesn’t work. Any ideas what may be causing this exception?

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

    User (Old forums)
    Member
    Post count: 23064

    Nevermind I figured it out…I think there is some rule in programming that the likelihood of figuring out your bug increases exponentially the moment after you post a help request.

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

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