Gridview rowcommand after refreshing

Posted by xt_20 on Stack Overflow See other posts from Stack Overflow or by xt_20
Published on 2010-05-31T05:42:55Z Indexed on 2010/06/02 6:53 UTC
Read the original article Hit count: 281

Filed under:
|
|
|

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?

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET