Hello i have this problem about WHDG which make my development freeze .
I have a Header Sqldatasource
<asp:SqlDataSource ID="sqldsourceHeader" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="ParentRead"
SelectCommandType="StoredProcedure">
</asp:SqlDataSource>
which retrieve this following Table:
ID | P/N | DATE | LOC
And the ChildSqlDatasource
<asp:SqlDataSource ID="sqlDsourceDetail" runat="server"
SelectCommand="Select * from Child where P/N=@P/N AND LOC=@LOC AND DATE>@DATE">
<SelectParameters>
<asp:Parameter Name="P/N" />
<asp:Parameter Name="LOC" />
<asp:Parameter Name="DATE" />
</SelectParameters>
which i need to get the Parameters from Parent .
I Relate my sqldatasource with WGDDataSource But it failed to Load the childBand
<ig:WebHierarchicalDataSource ID="WebHierarchicalDataSource1" runat="server">
<DataRelations>
<ig:DataRelation ChildColumns="P/N,LOC,DATE"
ChildDataViewID="sqlDsourceDetail_DefaultView"
ParentColumns="P/N,LOC,DATE"
ParentDataViewID="sqldsourceHeader_DefaultView" />
</DataRelations>
<DataViews>
<ig:DataView ID="sqldsourceHeader_DefaultView" DataMember="DefaultView"
DataSourceID="sqldsourceHeader" />
<ig:DataView ID="sqlDsourceDetail_DefaultView" DataMember="DefaultView"
DataSourceID="sqlDsourceDetail" />
</DataViews>
</ig:WebHierarchicalDataSource>
Sample Output:
1 A 7/7/2011 TEST
P/N | DATE | LOC (Child)
A 7/7/2011 TEST
2 B 7/7/2011 TEST2
B 7/7/2011 TEST2
------------------------------------------------------------------------------------------------------------------------------------------
After That i need to loop through Parent and child band in server side code c#
foreach (Containergridrow parent on WHDG.Rows)
{
foreach(//How can i get the child Rows)
}
I really need help .
Thanks in Regards
Anybody here.......i really need help..