Rebind gridview with updated row ASP.net
I have a gridview in ASP.nET and I have a "Select" command field. What I want to do is that when the user click on on the "select", I would like to take the selected开发者_JAVA技巧 row and do some calculations and rebind the original gridview with updated the row.
How can do this?
Thanks.
// do your thingy
DataGridViewName.DataBind();
There are a lot of places where grabbing the row is already explained. Take a look at this Link. You have to call the bind data method on the grid after your calculations. If you want to modify just that row, I would think you modify the source data collection for that row and rebind.
This link may also help. Instead of Edit, you could have Select.
精彩评论