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
FooterTemplate problem
posted

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Hi,
I have this webdatagrid, with a column "Estado". I applied a footer that contains a template.

In the code behind, after the databinding, if I try to access the button inside my FooterTemplate:

CType(wdgVendasVendedor.Columns.Item("Estado").Footer.FindControl("lbtnEstadoFooter"), Button).CssClass = "CmdDash"

It gives me an exception, because FindControl returns "Nothing".
How can I access the button inside my FooterTemplate at runtime?

Below is the gatagrid. Thank you.

<

 

 

ig:WebDataGrid ID="webDataGrid1" runat="server" AutoGenerateColumns="False" Width="100%" Height="200px" ShowFooter="True" EnableDataViewState="True" Visible="False">
   <Columns>
      
<ig:TemplateDataField Key="Estado" Width="16px" Header-Text="" Header-Tooltip="Alerta sobre o Desvio de Vendas">
          
<ItemTemplate>
               
<asp:Button ID="lbtnEstado" runat="server" Height="16px"></asp:Button>
          
</ItemTemplate>
          
<FooterTemplate>
               
<asp:Button ID="lbtnEstadoFooter" runat="server" Height="16px" CssClass="CmdVerdeDash"></asp:Button>
           </FooterTemplate>
       
</ig:TemplateDataField>
.......

 

 

 

 

 

 

 

 

 

 

 

 

</

 

 

Columns>
<Behaviors>
    
<ig:Selection RowSelectType="Single" Enabled="True" CellClickAction="Row"></ig:Selection>
<ig:ColumnResizing Enabled="false"></ig:ColumnResizing>
<ig:Filtering Alignment="Top" Visibility="Visible" Enabled="true" AnimationEnabled="false" />
</Behaviors>
</ig:WebDataGrid>

Parents Reply Children
No Data