<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 rajeshshirke,
Thank you for posting in the community.
I suggest that you try setting a primary key for both of your datatables in this scenraio, i.e:
Please let me know if this helps.
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
I tried but same error show for attached test sample.
Please let me know what version of .NetAdvantage you are using in this case.
Hi
i used same version as you used in above test sample
I have tried to replicate the behavior under IE6/7/8/9, Chrome, Firefox and Safari however so far I am not able to replicate the issue. The OS under which this is tested is Win7 64 bit. Any additional information regarding specific browser/system setting would help to isolate the matter.
I use IE8, FF and OS is Win7 32 bit.
First gird loads properly when i click on row left side arrow (to expand) show the error message box.
hi
I think this problem depens on post back, it's means when you bind grid it the first post, you don't have any problem, but if you bind it after first page load (such as multiview, and etc) you have the same error!
but I don't have any idea!
please help me guys
Please feel free to contact me if you are still experiencing any issues.
Thank you for your reply.
I can suggest that manually defining the bands and columns for your grid (and turining autogeneration off) in order to check whether that makes a difference.
Just as a note if you are using tracing, some users have reported that tracing may be causing the described issue:
http://forums.infragistics.com/forums/p/56012/291667.aspx
Hope this helps.