Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to programmatically clear Checkbox
Message
De
28/04/2008 15:45:18
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
How to programmatically clear Checkbox
Divers
Thread ID:
01313608
Message ID:
01313608
Vues:
68
Given the following HTML fragment, how can I clear the checkmark, in the checkbox with id = "checkAll", in code behind? I can get e reference to the containing grid with:
DirectCast(Page.FindControl("dgListItems"), DataGrid)
but I can't figure out how to get a reference to the checkbox in the HeaderTemplate in the ColumnTemplate.
<td><asp:datagrid id="dgListItems" runat="server" CssClass="labelText" Width="100%" OnSortCommand="dgListItems_HeaderSort"
                                        AllowSorting="True" AutoGenerateColumns="False" PageSize="12" AllowPaging="True">
                                        <AlternatingItemStyle CssClass="gridAlternateItem"></AlternatingItemStyle>
                                        <ItemStyle CssClass="gridLabelText"></ItemStyle>
                                        <HeaderStyle CssClass="gridHeader"></HeaderStyle>
                                        <Columns>
                                            <asp:TemplateColumn ItemStyle-HorizontalAlign="Center">
                                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                                <HeaderTemplate>
                                                    <asp:Label ID="lblAll" Runat="server" EnableViewState="False" CssClass="labeltext" ForeColor="Black">All</asp:Label>
                                                    <asp:CheckBox id="checkAll" Runat="server" OnCheckedChanged="CheckAll" AutoPostBack="True"></asp:CheckBox><br>
                                                    <br>
                                                </HeaderTemplate>
Thanks
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform