I am sure I am missing something very little, but I just can't see what. I have downloaded examples of the WHDG and compared the datasource/dataview setup. Here is my html:
<ig:WebHierarchicalDataGrid ID="whdg1" runat="server" DataSourceID="WebHierarchicalDataSource1" AutoGenerateColumns="false" AutoGenerateBands="false" InitialExpandDepth="0" DataKeyFields="QAMRID" InitialDataBindDepth="3" Width="800px"> <ExpandCollapseAnimation SlideOpenDirection="Auto" SlideOpenDuration="300" SlideCloseDirection="Auto" SlideCloseDuration="300" /> <Columns> <ig:BoundDataField DataFieldName="QAMRID" Key="QAMRID" Header-Text="QAMR ID" Hidden="true" /> <ig:BoundDataField DataFieldName="Title" Key="Title" Header-Text="QAMR Number" /> <ig:BoundDataField DataFieldName="DivisionTitle" Key="DivisionTitle" Header-Text="Division Title" /> </Columns> <Bands> <ig:Band DataMember="odsSignature" Key="Signatures" DataKeyFields="SignatureID" AutoGenerateColumns="false" > <Columns> <ig:BoundDataField DataFieldName="QAMRID" Key="QAMRID" Header-Text="QAMR ID" Hidden="true" /> <ig:BoundDataField DataFieldName="SignatureID" Key="SignatureID" Header-Text="Signature ID" /> <ig:BoundDataField DataFieldName="ApprovalName" Key="ApprovalName" Header-Text="Signature Name" /> <ig:BoundDataField DataFieldName="ApprovalType" Key="ApprovalType" Header-Text="Approval Type" /> </Columns> <Behaviors> <ig:EditingCore> <Behaviors> <ig:CellEditing Enabled="true" EditModeActions-EnableF2="true"> <ColumnSettings> <ig:EditingColumnSetting ColumnKey="SignatureID" ReadOnly="true" /> </ColumnSettings> </ig:CellEditing> </Behaviors> </ig:EditingCore> </Behaviors> </ig:Band> </Bands> </ig:WebHierarchicalDataGrid> <ig:WebHierarchicalDataSource ID="WebHierarchicalDataSource1" runat="server" > <DataRelations> <ig:DataRelation ParentColumns="QAMRID" ParentDataViewID="odsQAMR_DefaultView" ChildColumns="QAMRID" ChildDataViewID="odsSignatures_DataView" /> </DataRelations> <DataViews> <ig:DataView ID="odsQAMR_DataView" DataSourceID="odsQAMR" /> <ig:DataView ID="odsSignature_DataView" DataSourceID="odsSignature" /> </DataViews> </ig:WebHierarchicalDataSource> <asp:ObjectDataSource ID="odsQAMR" runat="server" DataObjectTypeName="QAMR" SelectMethod="GetQAMRsByPOP" TypeName="QAMR"> <SelectParameters> <asp:SessionParameter SessionField="POPID" Type="String" Name="pID" /> </SelectParameters> </asp:ObjectDataSource> <asp:ObjectDataSource ID="odsSignature" runat="server" SelectMethod="GetSignaturesForWHDG" TypeName="Signature"> <SelectParameters> <asp:SessionParameter Name="pID" SessionField="POPID" Type="String" /> </SelectParameters> </asp:ObjectDataSource>
The class used for the parent level is QAMR and has a method that returns a dataset. This loads fine.
The class used for the child band is Signature and has a method that returns a dataset.
I have not successfully created a WHDG before, so I am at a loss as to what else to do. I thought the views are created from the relationship.
Is it easy for you to see what I am missing here?
Hi. I got it. I was using the wrong view id for the datarelations tag. Silly me.
Thanks for your time!
Hello. I have changed the DataMember of the child band to the odsSignature_Dataview but that has not caused the child bands to show. I then changed the DataMember of the parent to the odsQAMR_Dataview. Still no child bands. I checked to make sure that both class methods are returning rows. I have 7 parents in the parent query and 4 rows/children in the child method query. I am still not getting the child bands to show. Should I change the type for the child bands?
Hello nbizub, Thank you for contacting Infragistics!We received your support request concerning the child band of your grid not appearing, and this case has been assigned to me. Infragistics is dedicated to helping you solve this issue. Our team and I have done an initial review of your case and I believe this occurring because you are using the incorrect DataMember for your child band currently you are using the DataSource ID when you want be using the ID of your DataView “odsSignature_DataView”.
What effect does changing the DataMember of your child band to the ID of the DataView have?
Please let me know if you have any questions concerning this matter.
Sincerely,Mike P.Developer Support EngineerInfragistics, Inc.www.infragistics.com