0
我似乎無法得到checkAll和uncheckAll的LinkButton功能使用JavaScript時,我的GridView裏面的UpdatePanel選擇所有全部不LinkButton的不工作時的GridView裏面的UpdatePanel
<asp:LinkButton ID="LinkButton1" runat="server" Text="Check All" OnClientClick="CheckOrUnCheckAll(true);return false;"></asp:LinkButton>
<asp:LinkButton ID="LinkButton2" runat="server" Text="Uncheck All" OnClientClick="CheckOrUnCheckAll(false);return false;"></asp:LinkButton>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
ShowHeaderWhenEmpty="True" EmptyDataText="No Uploads are found" ShowEmptyTable="True"
ShowFooterWhenEmpty="False" Style="margin-top: 20px" OnSelectedIndexChanged="GridView2_SelectedIndexChanged"
OnRowDataBound="GridView2_RowDataBound" OnRowCommand="GridView2_RowCommand" DataKeyNames="Id"
PageSize="8" AllowPaging="True" AlternatingRowStyle-BackColor="#C2D69B">
<AlternatingRowStyle BackColor="#C2D69B"></AlternatingRowStyle>
<Columns>
<asp:TemplateField HeaderText="Select">
<HeaderTemplate>
<asp:CheckBox ID="checkAll" runat="server" onclick="checkAll(this)" AutoPostBack="True" />
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" onclick="Check_Click(this)" AutoPostBack="True" />
</ItemTemplate>
</asp:TemplateField>
感謝名單一噸......這對我的作品 – Mishigen 2009-11-12 12:22:20