I have a windows application. When I select the 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 the option two from the combo-box, I bind the sameUltragrid to a DataTable. dt_MyTable.TableName = "Maestro"; this.ug_Reportes.DataSource = dt_MyTable;I get the following message when 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!
The problem seems to be that the DataMember is still looking for the table in the previous datasource. I believe you should call the SetDataBinding method again and set the DataSource and DataMember in one operation. Let me know if that works.
Michael S.
Hello Michael
Did you mean this?
this.ug_Reportes.SetDataBinding(dt_MyTable, "Maestro");
Still having the same error message.