编辑gridview行的问题 [英] problem with edit gridview row

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

问题描述

我想编辑和更新gridview row.but我有3列like-id,name address.i想要只编辑名称,地址..plz帮帮我?

I want to edit and update gridview row.but i have 3 column like-id,name address.i want edit only name,address..plz help me?

推荐答案

有很多方法可以做到这一点:

1)创建一个隐藏或不可见的列并用ID绑定它,它不可用于编辑

2)你甚至可以使用DataKeys做同样的事情。

There are ways to do this:
1) Create a hidden or invisible column and bind it with ID, it won''t be available for edit
2) You can even do the same thing by using DataKeys.
<asp:gridview runat="server" id="grid1" datakeynames="ID" xmlns:asp="#unknown">
<!-- Your code here -->
</asp:gridview>



见下文:

How_to_edit_and_Delete_records_in_a_gridview_using_datakeys [ ^ ]


请点击链接,只读列号ID



使用ASP.NET GridView中的事件实现累计总数和全选功能 [ ^ ]





谢谢
Please follow the link, Make readonly to Column ID

Implementing Cumulative total and Select All functionality with Events in ASP.NET GridView[^]


Thanks


这篇关于编辑gridview行的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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