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
40
Runtime Exception: No child grid script descriptors are available!
posted

I am working on WebHierarchicalDataGrid, and using two in table in dataset. and giving dataset to datasource and making relation from two tables student and subjects. Parent table (student) is showing in grid, but when want to show child table (subjects) then follwong message window is appears that "Runtime Exception: No child grid script descriptors are available". if any one have an idea how fix this issue please help me in this regard. Thanks in advance.

default.aspx page

<ig:WebHierarchicalDataGrid id="grdStudents" runat="server" height="400px" width="100%"
DataKeyFields="StudentID" AutoGenerateColumns="false" autoGenerateBands="True" InitialExpandDepth="0" onpageindexchanged="grdStudents_PageIndexChanged">

<Columns>
<ig:BoundDataField DataFieldName="StudentID" Key="StudentID" Header-Text="Student ID" Hidden="true">
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="Name" Key="Name" Header-Text="Name" Width="100px">
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="Email" Key="Email" Header-Text="Email" Width="100px">
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="BirthDate" Key="BirthDate" Header-Text="Birth Date">
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="Address" Key="Address" Header-Text="Address">
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="RegistrationNo" Key="RegistrationNo" Header-Text="Registration No">
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="RegistrationDate" Key="RegistrationDate" Header-Text="Registration Date">
</ig:BoundDataField>
<ig:BoundCheckBoxField DataFieldName="isActive" Key="isActive" Header-Text="Active"></ig:BoundCheckBoxField>
</Columns>
<Bands>
<ig:Band DataMember="Subjects" DataKeyFields="SubjectID" Key="SubjectID" AutoGenerateColumns="false">

<Columns>
<ig:BoundDataField DataFieldName="SubjectID" Key="SubjectID" Header-Text="Subject ID" Hidden="true">
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="StudentID" Key="StudentID" Header-Text="StudentID" width="150px"></ig:BoundDataField>
<ig:BoundDataField DataFieldName="SubjectName" Key="SubjectName" Header-Text="Subject Name" width="100px">
</ig:BoundDataField>

</Columns>

</ig:Band>
</Bands>

</ig:WebHierarchicalDataGrid>

default.aspx.cs page

private void LoadGridData()
{
blStudent objData = new blStudent();
DataTable dt = objData.GetStudentList();


blSubject objSubject = new blSubject();
DataTable dt2 = objSubject.GetSubjectList();

DataSet dsStudent = new DataSet();

dsStudent.Tables.Add(dt);
dsStudent.Tables.Add(dt2);

dsStudent.Tables[0].TableName = "Students";
dsStudent.Tables[1].TableName = "Subjects";

dsStudent.Relations.Add("rlnStudent", dsStudent.Tables["Students"].Columns["StudentID"], dsStudent.Tables["Subjects"].Columns["StudentID"], false);

DataView MsDataView = dsStudent.Tables[0].DefaultView;
grdStudents.DataSource = MsDataView;
grdStudents.DataBind();

}