The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I am binding a DataBoundGrid to a Dataset with two tables.On some event I want to bind the grid to some other DataTable.Want to display some other data not the previous one.
I wrote following code on that event which generated exception.
this.gridDataBoundGrid1.DataMember = "Messages";
this.gridDataBoundGrid1.DataSource = messageTable;
(messageTable is DataTable)
The exception was
Cannot create a child list for field Messages.
How to handle this?
ADAdministrator Syncfusion Team July 15, 2004 03:56 PM UTC
Try switching the order of the two statements.
this.gridDataBoundGrid1.DataSource = MessageTable;
this.gridDataBoundGrid1.DataMember = "Messages";
If that does not do it, then add this code first.
this.gridDataBoundGrid1.DataSource = null;
this.gridDataBoundGrid1.DataMember = "";
UMUmangiJuly 15, 2004 04:04 PM UTC
Hi Clay,
Thanks for your quick responses.
The problem is still there.
Even I tried DataMember = Null;
Umangi
ADAdministrator Syncfusion Team July 15, 2004 04:11 PM UTC
If you are setting DataSource to a DataTable (messageTable), then the only reason to set DataMember = "Messages" is if "Messages" is a name of a DataRelation that you want to see in a hierarchical grid. Is this the case?
If not, then DataMember should just be set to "".
UMUmangiJuly 15, 2004 04:57 PM UTC
This does not generate exception but only first column is displayed.
And when I try to bind with original data
I write following code.
this.gridDataBoundGrid1.DataMember = "QueryThreads";
this.gridDataBoundGrid1.DataSource = dataSet;
GridHierarchyLevel queryLevel = this.gridDataBoundGrid1.Binder.AddRelation("QueryThreadQuery");
Now the following exception is generated
''Cannot create a child list for field QueryThreads.''
Clay, Can u help me?
UMUmangiJuly 15, 2004 05:18 PM UTC
I did
DataMember = "";
DataSource = dataSet;
And It''s working!
Sorry for the trouble