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
40
Hierarchical view not coming up when AutoGenerateBands is set false
posted

I have used WebHierarchicalDataGrid in my project and I am binding the datasource of the grid using a dataset.

When I set the AutoGenerateBands = "True", then I get a Hierarchical view with all the parent and child columns but as soon as I make this as false and define my own columns in the child band I get only one parent row with no expand arrow and no child rows at all.

I am not able to figure out the problem. Any help will be appreciated.

Aspx Code:

<ig:WebHierarchicalDataGrid ID="WebHierarchicalDataGrid1" runat="server" AutoGenerateColumns="false"

    AutoGenerateBands="false" Height="100%" Width="100%" InitialDataBindDepth="-1"

    InitialExpandDepth="0" DataKeyFields="ID_APPLIESTO">

    <Columns>

        <ig:BoundDataField DataFieldName="APPLIESTO_VALUE" Key="APPLIESTO" Header-Text="Applies To" />

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

    </Columns>

    <Bands>

        <ig:Band ShowHeader="true" Key="B1" AutoGenerateColumns="false" DataKeyFields="ID_APPLIESTO">

            <Columns>

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

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

            </Columns>

        </ig:Band>

    </Bands>

</ig:WebHierarchicalDataGrid>

 

 

Binding Dataset:

oOraAdpt.Fill(ds);

ds.Relations.Add("1", ds.Tables[0].Columns["ID_APPLIESTO"], ds.Tables[1].Columns["ID_APPLIESTO"]);

whdg1.DataSource = ds;

whdg1.DataBind();