如何在网格视图中编辑和更新记录? [英] How to edit and update records in a grid view?

查看:147
本文介绍了如何在网格视图中编辑和更新记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目中有一个网格视图。每条记录都有一个命令事件EDIT,允许用户更新记录。我的教授希望我只有一个编辑按钮,允许网格视图中的所有记录都在要编辑的文本框内。如果编辑了网格视图中的任何记录,则编辑按钮将变为UPDATE按钮,并将更改保存在网格视图中。有什么帮助?

I have a grid view in my project. Each record has a command event EDIT that allows the user to update the records.My professor would like me to have ONLY ONE edit button that will allow all the records in the grid view will be inside a text box to be edited. And if any of the records inside the grid view edited, the edit button will become an UPDATE button and will save the changes inside the grid view. Any help?

推荐答案

你真正想要的是在编辑模式下显示所有行。然后当点击按钮时,你循环并处理每一行。



一个例子:

http://aspadvice.com/blogs/azamsharp/archive/2006/11/08 /Show-all-GridView-Rows-in-EditMode.aspx [ ^ ]
What you really want is to show all rows in Edit Mode. Then when the button is clicked you loop through and process each row.

An example:
http://aspadvice.com/blogs/azamsharp/archive/2006/11/08/Show-all-GridView-Rows-in-EditMode.aspx[^]


这篇关于如何在网格视图中编辑和更新记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆