Getting the text being selected in a GridView's row

Hi, I have this modalpopup dialog box which uses a panel and modalpopup extender, inside the panel, I have an update panel and inside the update panel, I have a gridview that was bind to a datasource. I can get the text being selected in a gridview if it is not inside the updatepanel. Can anyone help me on how to get the text of a seleted row in a gridview that is inside an update panel.

The code below works perfectly if the gridview control is not inside the panel.


 protected void grdMemberList_SelectedIndexChanged(object sender, EventArgs e)
    {
        txtMemberID.Text = grdMemberList.SelectedRow.Cells[1].Text;
    }