ASP.Net-保存后使gridview行不可编辑 [英] ASP.Net - Make gridview row uneditable after save

查看:89
本文介绍了ASP.Net-保存后使gridview行不可编辑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我是ASP.net的新手,并使用Grid视图将数据保存在数据库中.现在的问题是,一旦保存了行,该行的元素仍然是可编辑的.如何解决这个问题?

我在网格视图中使用了2个DropDownList和3个文本框.

感谢您的帮助.

删除了下划线,粗体字符等.尝试使主题具有描述性.

Hello,

I am new to ASP.net and using Grid view to save the data in the data base. Now my problem is that once I save the row, the elements of the row is still editable. How to remove this problem?

I am using 2 DropDownList and 3 textboxes in the grid view.

Thanks for help.

Removed underlines, bold characters etc. Tried making subject descriptive.

推荐答案

事件
更改editindex
像GridView1.EditIndex = 0;
取消下拉菜单
并调用bind方法/绑定您的gridview agin.
on GridView1_RowUpdating
event
change the editindex
like GridView1.EditIndex = 0;
disble your dropdown
and call bind method/ bind your gridview agin.


这篇关于ASP.Net-保存后使gridview行不可编辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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