0
I need to format Textbox <asp:TextBox runat="server" id="txtValor" MaxLength="20"></asp:TextBox and I’m having a lot of difficulty, first this grid is open in a modal, I mean, when I create the main page I can’t get the control by javascript and put the mask, because these controls haven’t been initialized yet.
I need to perform this formatting only when opening this modal and loading this grid, as I can perform this formatting to decimal field?
<asp:UpdatePanel runat="server" ID="upnVincGridFuncionarios" RenderMode="Inline" UpdateMode="Conditional">
            <ContentTemplate>
                <asp:GridView runat="server" ID="gdvVincFuncionarios" Width="100%" OnRowDataBound="gdvVincFuncionarios_RowDataBound">
                    <Columns>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <asp:Label runat="server" ID="lblNameHead" Text='Nome'></asp:Label>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblNameEmployee" Text='<%#DataBinder.Eval(Container.DataItem, "Name") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="Msisdn" HeaderText="Celular" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" />
                        <asp:BoundField DataField="Cpf" HeaderText="CPF" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" />
                        <asp:BoundField DataField="NumRegistration" HeaderText="Matrícula" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" />
                        <asp:BoundField DataField="CostCenter" HeaderText="Centro de Custo" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" />                        
                        <asp:TemplateField>
                             <HeaderTemplate>
                                <asp:Label runat="server" ID="lblValorHead" Text='Valor'></asp:Label>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <span style="display: none">
                                    <asp:Label runat="server" ID="lblVincIdEm" Text='<%#DataBinder.Eval(Container.DataItem, "IdEm") %>'></asp:Label>
                                </span>     
                                <asp:TextBox runat="server" id="txtValor" MaxLength="20"></asp:TextBox>                           
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </ContentTemplate>
        </asp:UpdatePanel>