惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
J
Java Code Geeks
I
InfoQ
腾讯CDC
Vercel News
Vercel News
IT之家
IT之家
V
Visual Studio Blog
P
Proofpoint News Feed
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
G
Google Developers Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 叶小钗
有赞技术团队
有赞技术团队
月光博客
月光博客
Martin Fowler
Martin Fowler
量子位
L
LangChain Blog
B
Blog
Last Week in AI
Last Week in AI
博客园 - 司徒正美
Microsoft Security Blog
Microsoft Security Blog
博客园 - 聂微东
Microsoft Azure Blog
Microsoft Azure Blog
A
About on SuperTechFans

博客园 - 赵国亮

诚聘:网站高级程序员 诚聘:网站高级程序员 RSS2.0规范(转) 一则深有寓意的故事! 心情不爽,贴几张以前工作的照片 有效沟通,让程序员不再是兔子! 工作一年 离开公司... VB.NET验证码生成代码 - 赵国亮 - 博客园 ASP与ASP.NET互通COOKIES的一点经验 面向对象设计需要遵循的一些基本原则 ASP.NET大型OA中常用的一些报表生成,压缩,下载等操作代码 数据结构学习笔记 在DataGrid中实现鼠标指定列特殊显示的代码(VB.NET 2003) 实现向指定Url提交信息并取得返回信息 - 赵国亮 - 博客园 在不同的文本框回车触发指定按钮代码 - 赵国亮 - 博客园 页面选项卡代码 - 赵国亮 - 博客园 图片文件上传入SQL库及显示代码 - 赵国亮 - 博客园 一个比较帅的页面加载效果! - 赵国亮 - 博客园
在DataGrid中实现无刷新编辑列的代码(VB.NET 2003)
赵国亮 · 2006-06-16 · via 博客园 - 赵国亮

        在VB.NET 2003的DataGrid中,通过使用编辑列可以在页面中实现一种无刷新效果,其实现代码如下:

        在DataGrid的EditCommand事件中代码如下:
        Private Sub DataGrid_EditCommand(ByVal source As System.Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DataGrid.EditCommand
            DataGrid.EditItemIndex = e.Item.ItemIndex
            '数据绑定
            BindData()
        End Sub

        在DataGrid的UpdateCommand事件中代码如下:
        Private Sub DataGrid_UpdateCommand(ByVal source As System.Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DataGrid.UpdateCommand
            '数据更新
            Update()
            DataGrid.EditItemIndex = -1
            '数据绑定
            BindData()
        End Sub

        在DataGrid的CancelCommand事件中代码如下:
        Private Sub DataGrid_CancelCommand(ByVal source As System.Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DataGrid.CancelCommand
            DataGrid.EditItemIndex =  -1
            '数据绑定
            BindData()
        End Sub