<ig:WebHierarchicalDataGrid ID="whdg" runat="server" Height="350px" Width="400px" DataKeyFields="ID"></ig:WebHierarchicalDataGrid>
DataTable dtContract = new DataTable("Contract"); dtContract.Columns.Add("ID"); dtContract.Columns.Add("CName");
DataRow drContract; drContract = dtContract.NewRow(); drContract[0] = "11"; drContract[1] = "Origin"; dtContract.Rows.Add(drContract);
DataTable dtPipe = new DataTable("Pipe"); dtPipe.Columns.Add("ID"); dtPipe.Columns.Add("PName");
DataRow drSwp; drSwp = dtPipe.NewRow(); drSwp[0] = "11"; drSwp[1] = "SWP"; dtPipe.Rows.Add(drSwp);
DataSet ds = new DataSet(); ds.Tables.Add(dtContract); ds.Tables.Add(dtPipe);
ds.Relations.Add("ID", ds.Tables["Contract"].Columns["ID"], ds.Tables["Pipe"].Columns["ID"]);
whdg.DataSource = ds; whdg.DataBind();
ERROR:
Hi
i used same version as you used in above test sample
Hi rajeshshirke,
Please let me know what version of .NetAdvantage you are using in this case.
I tried but same error show for attached test sample.
Attached is my test sample which uses the code you have provided and version 11.2.20112.1019. Please let me know if the issue persists with this sample. In order to research the matter further I would need to know your exact product version.
Feel free to contact me if you have any additional questions.
Hi,
i set primarykey for both tables
dtContract.PrimaryKey =
new DataColumn[] { dtContract.Columns["ID"] };
dtPipe.PrimaryKey =
new DataColumn[] { dtPipe.Columns["ID"] };
But still shows the same error
Help ME