Home Forums WinForms controls Xceed Grid for WinForms Exception "Child list for field RelationParentChild cannot be created" in SetDataBinding on DetailGrid

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



    I encountered some strange behaviour on the Xceed Gridcontrol for Windows Forms  (v3.9), trying to implement a databound master detail

    grid. I setup and loaded two datatables in a dataset with an additional Parent-Child-Relationship between these two tables added to the

    dataset. The relation has been tested, there is no problem in navigating the parent-child relationship (e.g. by calling DataRow.GetChildRows,

    using this relation).

    When establishing the databinding in the detailgrid, an exception is thrown: “Child list for field RelationParentChild cannot be created”

    The actual code looks like this:



    gridControl.SetDataBinding(dataTableParent, “”);

    // additional code to setup grid


    DetailGrid detailGrid = new DetailGrid();

    // additional code to setup detail grid


    detailGrid.SetDataBinding(dataTableChild, relationName); // here exception occurs


    I read related postings to this problem, but none seems to address this special issue, as the databinding

    should be complete here.

    Any ideas on this strange behaviour?









    Imported from legacy forums. Posted by Dietmar (had 2067 views)

    Xceed Support
    Post count: 5658

    Hi Dietmar,

    I would have to see all your code where it concerns
    binding to the GridControl. You can always refer to the online documentation
    which describes in full detail how to add the Master/Detail feature to the Grid
    for .NET. Just by looking at the simple code snippet in your post, it seems as
    though everything is ok. You can always send us a sample application (you can
    use the Northwind Database which we provide for you as a DLL
    Xceed.Grid.Samples.SampleData) and we can see what is exactly going on.
    You can send it to support@xceed.com and please make a reference to this post
    so that we know it is you. If you want to retrace your steps
    instead, you can refer to the information below that I have gathered for you.

    You can also create a DataSet with the relation
    already done for you and
    just bind your DataSet to the DataSource of your DataGridControl instance. An
    example of this can be found in the MasterDetailGrid sample application.

    C:\Xceed Samples\Xceed Grid for .NET
    If you want to set the relation in code behind, you can do as in the regular
    MasterDetail sample application which does it for you in the LoadSynchronizedGrid
    method in the MasterDetail class.

    C:\Xceed Samples\Xceed Grid for .NET

    Imported from legacy forums. Posted by Marc [Xceed] (had 949 views)

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