gridview在进入编辑模式后,如何获取用户修改后的值?
对应的列用的是BoundField 而不是采用的模板列
<asp:BoundField DataField="Pwd" HeaderText="密码">
</asp:BoundField>
比如有一列是这个字段 如何在编辑模式下获取用户修改后的值?还有一个 如何在进入编辑模式下 只能修改gridv中的一列的值??
对应的列用的是BoundField 而不是采用的模板列
<asp:BoundField DataField="Pwd" HeaderText="密码">
</asp:BoundField>
比如有一列是这个字段 如何在编辑模式下获取用户修改后的值?还有一个 如何在进入编辑模式下 只能修改gridv中的一列的值??
解决方案 »
- SiteServer后台登陆出现安全性异常
- 进销存中 进、销、存之间的运作是怎么处理的。。。
- Gridview B/S 导出到Excel 会讲的来~会翻译的GO GO GO!
- 请教一个关于客户端访问服务器上视频文件,却无法在线播放的问题.在线等```
- 请问Static Nested Class 和 Inner Class 的区别?
- imagemap的问题
- 请教关于使用梅花雨日历控件无法获取提交后的值?
- 请教一个dataGrid问题
- petshop中的category中的控件怎会出现错误了.
- 上火最简单的连接都不行了 帮看看
- asp.net 页面跳转后的困惑!!!请大家帮帮忙
- 关于timer控件使用!!
在RowUpdating事件中获取:
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
string pw = ((TextBox)GridView1.Rows[e.RowIndex].Cells[2].Controls[0]).Text;
Response.Write(pw);
}
应该在EditItemComplate里边读取的。
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
bind();
string pw = ((TextBox)GridView1.Rows[e.NewEditIndex].Cells[2].Controls[0]).Text;
Response.Write(pw);
}