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
745
Urgent........How to add One more child band for SelfReferenced Hierarchical grid
posted

Hi All,

I developed a webheirarchy grid using 2009.2 version which is a self referenced Heirarchy grid....but i want to display another child band  based on  the last grand child result..i did the coding upto self reference child bands...below shows the code

 

.aspx

<ig:WebHierarchicalDataGrid ID="whdg_process_repository" runat="server" AutoGenerateBands="false"

                                        AutoGenerateColumns="false" EnableViewState="false" Font-Size="Smaller" InitialDataBindDepth="-1"

                                        InitialExpandDepth="0" OnInitializeRow="whdg_process_repository_OnInitializeRow"

                                        Visible="true" Width="100%">

                                        <ExpandCollapseAnimation SlideCloseDirection="Auto" SlideCloseDuration="300" SlideOpenDirection="Auto"

                                            SlideOpenDuration="300" />

                                        <Columns>

                                            <ig:TemplateDataField Key="Id">

                                                <ItemTemplate>

                                                    <asp:HiddenField ID="HiddenFieldComplianceRep" runat="server" Value='<%# Eval("Id") %>' />

                                                </ItemTemplate>

                                            </ig:TemplateDataField>

                                            <ig:TemplateDataField Key="FrameWorkName">

                                                <Header Text="FrameWorkName" />

                                                <ItemTemplate>

                                                    <asp:Label ID="Label_FrameWorkName" runat="server" Text='<%# Eval("FrameWorkName") %>'

                                                        Width="250px"></asp:Label>

                                                </ItemTemplate>

                                            </ig:TemplateDataField>

                                            <ig:TemplateDataField Key="OpenFindings">

                                                <Header Text="OpenFindings" />

                                                <ItemTemplate>

                                                    <asp:Label ID="Label_OpenFindings" runat="server" Text="" Width="250px"></asp:Label>

                                                </ItemTemplate>

                                            </ig:TemplateDataField>

                                            <ig:TemplateDataField Key="ClosedFindings">

                                                <Header Text="ClosedFindings" />

                                                <ItemTemplate>

                                                    <asp:Label ID="Label_ClosedFindings" runat="server" Text="" Width="250px"></asp:Label>

                                                </ItemTemplate>

                                            </ig:TemplateDataField>

                                            <ig:TemplateDataField Key="Rating">

                                                <Header Text="Rating" />

                                                <ItemTemplate>

                                                    <asp:Label ID="Label_Rating" runat="server" Text="" Width="250px"></asp:Label>

                                                </ItemTemplate>

                                            </ig:TemplateDataField>

                                            <ig:TemplateDataField Key="AddControl">

                                                <Header Text="Add Control" />

                                                <ItemTemplate>

                                                    <asp:Button runat="server" ID="Button_AddControl" CssClass="submitSmallButton" Text="Add"

                                                        ToolTip="Add Control" CausesValidation="false"></asp:Button>

                                                </ItemTemplate>

                                            </ig:TemplateDataField>

                                        </Columns>

                                        <Bands>

                                            <ig:Band AutoGenerateColumns="false" IsSelfReference="true">

                                                <Columns>

                                                    <ig:TemplateDataField Key="Id">

                                                        <ItemTemplate>

                                                            <asp:HiddenField ID="HiddenFieldComplianceRepChild" runat="server" Value='<%# Eval("Id") %>' />

                                                        </ItemTemplate>

                                                    </ig:TemplateDataField>

                                                     <ig:BoundDataField Header-Text="Type" />

                                                    <%-- <ig:BoundDataField CssClass="description" DataFieldName="Description" 

                                                            Header-Text="Description" Key="description" Width="200px" />

                                                        <ig:BoundDataField DataFieldName="Type" Header-Text="Type" Key="type" />

                                                        <ig:BoundDataField CssClass="exported" DataFieldName="Exported" Header-Text="" Key="exported" />--%>

                                                </Columns>

                                            </ig:Band>                                            

                                        </Bands>

                                    </ig:WebHierarchicalDataGrid>

 

.aspx.cs

 public void loadDatatoWHDGridProcessRep()

    {

 

        DataSet ds = new DataSet();

        ds = new ComplianceReportBO().GetFrameWorkNames();

 

 

        if (ds.Tables[0].Rows.Count > 0)

        {

            DataRelation rel = new DataRelation("ComplianceRep", ds.Tables["ComplianceRep"].Columns["Id"], ds.Tables["ComplianceRep"].Columns["parent_id"]);

            ds.Relations.Add(rel);

 

            // Set the table's primary key field

            ds.Tables["ComplianceRep"].PrimaryKey = new DataColumn[] { ds.Tables["ComplianceRep"].Columns["Id"] };

 

            this.whdg_process_repository.IsSelfReference = true;

            this.whdg_process_repository.MaxDataBindDepth = 2;

            this.whdg_process_repository.DataSource = ds;

            this.whdg_process_repository.DataMember = "ComplianceRep";

            this.whdg_process_repository.DataKeyFields = "Id";

            this.whdg_process_repository.DataBind();      

        }       

 

    }   

 

Please suggest me hw can i do

Parents
No Data
Reply Children
No Data