开发者

Rebind gridview with updated row ASP.net

开发者 https://www.devze.com 2023-03-21 17:24 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消