Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
155
Child list for field TableName cannot be created
posted

I have a windows application. When I select option one from a combo-box, I bind an UltraGrid control to a DataSet with to DataTables (Maestro and Detalle) and a Relation between them:

    ds_MaestroDetalle.Relations.Add(
                    "Maestro_Detalle",
                    ds_MaestroDetalle.Tables["Maestro"].Columns["ID"],
                    ds_MaestroDetalle.Tables["Detalle"].Columns["ID"]);

Since I want to Export to Excel the info in the two DataTables and the relationship, I use SetDataBindings:

    this.ug_Reportes.SetDataBinding(ds_MaestroDetalle, "Maestro");

Then, when I select option two from the same combo-box, I bind the same
Ultragrid to a DataTable.

    dt_MyTable.TableName = "Maestro";
    this.ug_Reportes.DataSource = dt_MyTable;


I get following message binding to the second option:  "Child list for field Maestro cannot be created."

I guess, when binding to the DataTable in the second option, UltraGrid is currently looking for Table Maestro in the DataSet (first option).

I try to UltraGrid.DataBindings.Clear(), UltraGrid.DataSource = null, but I don't know how to reset UltraGrid to start binding again without problems.

 

Thanks in advanced!

Parents
No Data
Reply
  • 10
    posted

    I have exactly the same problem. Hope somebody knows how to handle it. Please let me know if you solve it. Thanks,

Children
No Data