tags:

views:

12

answers:

1

            <asp:BoundField DataField="mail" SortExpression="mail" HeaderText="Com Rec">
                <HeaderStyle Font-Size="X-Small" ForeColor="White" HorizontalAlign="Left" />
                <ItemStyle Font-Size="X-Small" HorizontalAlign="Left" />
            </asp:BoundField>

        <asp:TemplateField  HeaderText="Status Change">
        <ItemTemplate>
            &nbsp;<asp:CheckBox ID="chkstatus" Width=5px  runat="server" />
            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        </ItemTemplate>
        </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:HiddenField ID="hdID" runat="server" Value='<%# eval("DATE_CREATED") %>' />
                    <asp:HiddenField ID="qiaid" runat="server" Value='<%# eval("ID") %>' />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>

Code behind

Dim xitem As GridViewRow

    Dim ID As HiddenField

    For Each xitem In datagrid1.Rows

        Dim rowCount As Integer
        rowCount = datagrid1.Rows.Count

        Dim tempvalue1 As CheckBox

        'For i = 0 To (rowCount - 1)
        xitem.Cells(13).Text.ToString()
        tempvalue1 = DirectCast(xitem.Cells(13).FindControl("chkstatus"), CheckBox)




        If tempvalue1.Checked = True Then
                            QIA_ID = xitem.FindControl("qiaid")
            Dim strUpdate As String

            strUpdate         
    Try
                Dim cmd As DbCommand
                cmd = QIA.GetSqlStringCommand(strUpdate)
                QIA.ExecuteNonQuery(cmd)
                Label1.Text = "Succesfylly moved to Archive"
                Label1.Visible = True

        End If
    Next

The tempcheckbox always shows false..please suggest me

A: 

page is not postback

tin