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();
}
http://es.infragistics.com.es/community/forums/p/35449/292238.aspx--- LINK IS NOT WORKING
Hello Haroon,
Thank you for posting in the community.
There are two likely causes to this issue in this scenario:
1. The grid is not rebound on each postback. Assuming that InitialDataBind depth is not being changed elsewhere in the code, the grid would use load on demand. On each postback to fetch new children, the grid would need to access the datasource to find the respective children to be fetched. Should LoadGrid not be called on each postback, the described issue is likely to occur. More information on that matter may be found at:
http://es.infragistics.com.es/community/forums/p/35449/292238.aspx
2. Alternatively, it is possible to receive the "No child descriptors ..." message if tracing is enabled for the application in question. For more information on the causes of this issue, please refer to:
http://es.infragistics.com/community/forums/t/56012.aspx