views:

32

answers:

1

I have a gridview inside an updatepanel. After updating the gridview, accessing the individual rows does not seem to give the right row. For example:

 protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            GridViewRow row = ((e.CommandSource as Control).NamingContainer as GridViewRow);

Row from the above code gives the values from the gridview before the gridview is refreshed/updated. Anyone knows how to get the updated values?

A: 

Try using the following to get a row index.

e.CommandArgument


Here is a good reference

funkymushroom