Hi all,
I have added a template field in a gridview. In that i have added a radio button. I have written a code which will get row Id of GridView of a row which is having a radiobutton on it checked. Through code i am getting even name of that radio button, but it is showing me that radio button is not checked, even when it is already checked. Here is the code.

Dim row As GridViewRow
        Dim rd As RadioButton
        Dim rowId As Integer = -1
        For Each row In GridView1.Rows
            rd = CType(row.FindControl("radio1"), RadioButton)
            If rd.Checked = True Then
                rowId = row.RowIndex
                Exit For
            End If
        Next

Even when a radio button is checked the code never enters the if block.
Pls help me urgently. Deadline appraoches soon ! :)

Please, can anyone help ??? I am desparately seeking solution to this problem !!!

Can't ne1 here help me on this topic ??????????????????????????????
:(

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.