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
100
Get Rows of Band in Load-on-Demand.
posted

I have a problem to get a rows of band on WebHierarchicalDataGrid, follow code above: 

I can see a rows of a band, a try different ways, but return always only a Father values not a Child.

ASPX.CS:

         protected void btnGerarConsulta_Click(object sender, EventArgs e)
        {
            foreach (Infragistics.Web.UI.GridControls.GridRecord row in grdTabelaColuna.Rows)
            {
                foreach (Infragistics.Web.UI.GridControls.GridRecordItem item in row.Items)
                {
                    CheckBox chkSelecionado = ((CheckBox)row.FindControl("chkSelecione"));
                    if (chkSelecionado != null)
                        if (chkSelecionado.Checked)
                        {
                            camadaObjeto.consulta.Usuario = 1;
                            camadaObjeto.consulta.Coluna = item.Text;
                            camadaNegocio.generica.InsereGenericaTabelaColuna();
                        }
                }
            }
        }

ASPX:

        <ig:WebHierarchicalDataGrid ID="grdTabelaColuna" runat="server" EnableDataViewState="false"
            AutoGenerateColumns="False" AutoGenerateBands="False" DataKeyFields="idTabela"
            DataMember="Tabela" Key="Tabela" Width="600px">
<GroupingSettings>
<RemoveButton AltText="Ungroup Column"></RemoveButton>
</GroupingSettings>

            <Columns>
                <ig:BoundDataField DataFieldName="idTabela" Hidden="True" Key="bcidTabela">
                    <Header Text="idTabela" />
                </ig:BoundDataField>
                <ig:BoundDataField DataFieldName="Tabela" Key="bcTabela">
                    <Header Text="Tabela" />
                </ig:BoundDataField>
            </Columns>

<CollapseButton AltText="Collapse Row"></CollapseButton>

<ExpandButton AltText="Expand Row"></ExpandButton>
            <Bands>
                <ig:Band AutoGenerateColumns="False" DataMember="Coluna" Key="Coluna">
                    <ExpandButton AltText="Expand Row" />
                    <CollapseButton AltText="Collapse Row" />
                    <GroupingSettings>
                        <RemoveButton AltText="Ungroup Column" />
                    </GroupingSettings>
                    <Columns>
                        <ig:BoundDataField DataFieldName="idColuna" Hidden="True" Key="bcidColuna">
                            <Header Text="idColuna" />
                        </ig:BoundDataField>
                        <ig:BoundDataField DataFieldName="idTabela" Hidden="True" Key="bcidTabela">
                            <Header Text="idTabela" />
                        </ig:BoundDataField>
                        <ig:BoundDataField DataFieldName="Coluna" Key="bcColuna">
                            <Header Text="Coluna" />
                        </ig:BoundDataField>
                        <ig:BoundDataField DataFieldName="Tipo" Hidden="True" Key="bcTipo">
                            <Header Text="Tipo" />
                        </ig:BoundDataField>
                        <ig:BoundDataField DataFieldName="Tamanho" Hidden="True" Key="bcTamanho">
                            <Header Text="Tamanho" />
                        </ig:BoundDataField>
                        <ig:TemplateDataField Key="Selecionado">
                            <ItemTemplate>
                                <asp:Panel ID="Panel1" runat="server" HorizontalAlign="Center" Width="100%">
                                    <asp:CheckBox ID="chkSelecione" runat="server" />
                                </asp:Panel>
                            </ItemTemplate>
                            <HeaderTemplate>
                                <asp:Panel ID="Panel2" runat="server" HorizontalAlign="Center">
                                    Selecione
                                </asp:Panel>
                            </HeaderTemplate>
                        </ig:TemplateDataField>
                    </Columns>
                </ig:Band>
            </Bands>
            <Behaviors>
                <ig:Selection CellSelectType="None">
                </ig:Selection>
            </Behaviors>
        </ig:WebHierarchicalDataGrid>
        <asp:Button ID="btnGerarConsulta" runat="server" Text="Gerar Consulta"
            Width="602px" BackColor="#A2D4F4" BorderColor="#66CCFF" BorderStyle="Outset"
            BorderWidth="1px" ForeColor="White"
            style="font-family: Verdana; font-weight: 700; color: #FFFFFF"
        onclick="btnGerarConsulta_Click" />
        <br />
        <br />
        <table class="style1">
            <tr>
                <td>
                    <hr width="30px" align="left" />
                </td>
                <td>
                    <asp:Label ID="Label1" runat="server" Font-Names="Verdana" Font-Size="Small" Text="Resultado da Pesquisa" Width="150px" />
                </td>
                <td>
                    <hr width="607px" align="left" />
                </td>
            </tr>
        </table>
        <ig:WebHierarchicalDataGrid ID="WebHierarchicalDataGrid1" runat="server"
            Height="350px" Width="800px">
<GroupingSettings>
<RemoveButton AltText="Ungroup Column"></RemoveButton>
</GroupingSettings>

<CollapseButton AltText="Collapse Row"></CollapseButton>

<ExpandButton AltText="Expand Row"></ExpandButton>
        </ig:WebHierarchicalDataGrid>

 Thanks.

Parents Reply Children
No Data