Hi All,
I had a parent and and two child bands in WHDG. where as i need to bind the sum of Child Column value to Parent Column at the time of DataBinding. i atteched an jpg file..plz give me reply..
am using 2009.2 version
Regards
Naag
Hi Naag,
Can you provide some more information, such as what type of data source you are binding your WHDG to ?
Best Regards,
Petar IvanovDeveloper Support EngineerInfragistics, Inc.http://ko.infragistics.com/support
Hi Petar,
Thanks for your reply... here how i am using my dataset for hierarchical display
.Aspx
<ig:WebHierarchicalDataGrid ID="WebHierarchicalDataGrid1" runat="server" Height="712px"
Width="827px" DataKeyFields="ID" DataMember="Parent" AutoGenerateBands="False" OnInitializeRow="WebHierarchicalDataGrid1_OnInitializeRow"
AutoGenerateColumns="False" Key="Parent">
<Columns>
<ig:BoundDataField DataFieldName="FrameWorkName" Key="FrameWorkName" >
<Header Text="Authratitive Source" />
<Header Text="Authratitive Source"></Header>
</ig:BoundDataField>
<ig:TemplateDataField Key="OpenFindings">
<Header Text="OpenFindings" />
<ItemTemplate>
<asp:Label ID="Label_ParentOpenFindings" runat="server" Text='<%# Eval("OpenFindings") %>' Width="250px"></asp:Label>
</ItemTemplate>
</ig:TemplateDataField>
<ig:TemplateDataField Key="ClosedFindings">
<Header Text="ClosedFindings" />
<asp:Label ID="Label_ParentClosedFindings" runat="server" Text='<%# Eval("ClosedFindings") %>' Width="250px"></asp:Label>
<ig:TemplateDataField Key="Rating">
<Header Text="Rating" />
<asp:Label ID="Label_ParentRating" runat="server" Text="" Width="250px"></asp:Label>
<ig:TemplateDataField Key="AddControl">
<Header Text="Add Control" />
<asp:Button runat="server" ID="Button_ParentAddControl" CssClass="submitSmallButton" Text="Add"
ToolTip="Add Control" CausesValidation="false"></asp:Button>
</Columns>
<Bands>
<ig:Band AutoGenerateColumns="False" DataMember="Child1" Key="Bands" DataKeyFields="ID">
<ig:BoundDataField DataFieldName="FrameWorkName" Key="FrameWorkName">
<asp:Label ID="Label_Child1OpenFindings" runat="server" Text='<%# Eval("OpenFindings") %>'></asp:Label>
<asp:Label ID="Label_Child1ClosedFindings" runat="server" Text='<%# Eval("ClosedFindings") %>'></asp:Label>
<asp:Label ID="Label_Child1Rating" runat="server" Text=""></asp:Label>
<asp:Button runat="server" ID="Button_Child1AddControl" CssClass="submitSmallButton" Text="Add"
<ig:Band AutoGenerateColumns="False" DataMember="Child2" Key="Child2" DataKeyFields="ID">
<asp:Label ID="Label_Child2OpenFindings" runat="server" Text='<%# Eval("OpenFindings") %>'></asp:Label>
<asp:Label ID="Label_Child2ClosedFindings" runat="server" Text='<%# Eval("ClosedFindings") %>'></asp:Label>
<asp:Label ID="Label_Child2Rating" runat="server" Text=""></asp:Label>
<asp:Button runat="server" ID="Button_Child2AddControl" CssClass="submitSmallButton" Text="Add"
<ig:Band AutoGenerateColumns="False" DataMember="Child3" Key="Child3" DataKeyFields="ID">
<ig:TemplateDataField Key="Control">
<Header Text="Control" />
<asp:Label ID="Label_Control" runat="server" Text='<%# Eval("Control") %>'></asp:Label>
<asp:Label ID="Label_Child3OpenFindings" runat="server" Text='<%# Eval("OpenFindings") %>'></asp:Label>
<asp:Label ID="Label_Child3ClosedFindings" runat="server" Text='<%# Eval("ClosedFindings") %>'></asp:Label>
<ig:TemplateDataField Key="Result">
<Header Text="Result" />
<asp:Label ID="Label_Result" runat="server" Text=""></asp:Label>
<ig:TemplateDataField Key="Delete">
<Header Text="" />
<asp:LinkButton CommandArgument='<%# Bind("Id") %>' ID="LinkButton_Delete" OnClick="LinkButton_Delete_Click"
runat="server"><img src="../../static/images/trash_16x16.gif" width="12" height="11" alt="Delete Control" title="Delete Control" /></asp:LinkButton>
</ig:Band>
</Bands>
<Behaviors>
<ig:EditingCore EnableInheritance="true">
</ig:EditingCore>
</Behaviors>
</ig:WebHierarchicalDataGrid>
Parent:--------------0
Child1:----------0
Child2:-----------0
Child3-------2
Child4-------3
and i need like this
Parent:----------------9
Child1:-----------4
Child2:-----------5