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

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 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.