Hi,
I have a grdiview with checkbox both are in an updatepanel.
What i'm trying to do is whenever a checkbox is clicked i want my labelbox to show +1 and when it's unchecked i want to show -1 .
The problem i'm having is i can't access that check box, it doesn't recognized it when i start writing checkbox2 ...... my code looks like this :
vb Code:
<asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:GridView ID="GridView1" runat="server" AllowPaging="True" OnRowDeleting="GridView1_RowDeleting" OnRowEditing="GridView1_RowEditing" onrowupdating="GridView1_RowUpdating" onrowcancelingedit="GridView1_RowCancelingEdit" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="ID" PageSize="20" style="font-size: 7pt; font-family: Tahoma" UseAccessibleHeader="False"> <Columns> <asp:TemplateField ShowHeader="False"> <ItemTemplate> <asp:CheckBox ID="CheckBox2" runat="server" /> </ItemTemplate> </asp:TemplateField> <asp:CommandField CancelText="C" DeleteText="D" EditText="E" InsertText="I" NewText="N" SelectText="S" ShowDeleteButton="True" ShowEditButton="True" UpdateText="U" /> <asp:TemplateField HeaderText="ID" Visible="False"> <EditItemTemplate> <asp:TextBox ID="textID2" runat="server" Text='<%# Bind("ID") %>' Width="28" Font-Size="8" Font-Names="tahoma" Enabled="False"></asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label15" runat="server" Text='<%# Bind("ID") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> .....
thanks




Reply With Quote