zoukankan
html css js c++ java
手动写GridView的RowEditing RowCancelingEdit RowUpdating RowDeleting 事件 和 删除 出现提示
先定一个绑定的方法
void
Bind()
{
this
.GridViewUser.DataSource
=
new
BILL.OperateUser().SelectOneUserSqlComd();
this
.GridViewUser.DataBind();
}
protected
void
GridView1_RowEditing(
object
sender, GridViewEditEventArgs e)
{
//
索引编辑时
this
.GridViewUser.EditIndex
=
e.NewEditIndex;
Bind();
}
protected
void
GridView1_RowCancelingEdit(
object
sender, GridViewCancelEditEventArgs e)
{
//
编辑结束时
this
.GridViewUser.EditIndex
=
-
1
;
Bind();
}
protected
void
GridViewUser_RowUpdating(
object
sender, GridViewUpdateEventArgs e)
{
//
更新时
this
.GridViewUser.EditIndex
=
-
1
;
Bind();
}
GridView的AutoGenerateDeleteButton
=
"
True
"
AutoGenerateEditButton
=
"
True
"
//
删除出现提示
protected
void
GridViewUser_RowDataBound(
object
sender, GridViewRowEventArgs e)
{
//
如果是绑定数据行
if
(e.Row.RowType
==
DataControlRowType.DataRow)
{
if
(e.Row.RowState
==
DataControlRowState.Normal
||
e.Row.RowState
==
DataControlRowState.Alternate)
{
//
找到生成“删除”所在单元格
LinkButton lb
=
(LinkButton)e.Row.Cells[
0
].Controls[
2
];
lb.Attributes.Add(
"
onclick
"
,
"
javascript:return confirm('你确认要删吗?')
"
);
}
}
}
查看全文
相关阅读:
世界城堡论坛
瑞典皇家理工学院工程实例:An Advanced Speech Codec for a Voice over IP Transmission System
压缩域丢包补偿:Demo of Compressed Domain Packet Loss Concealment of Sinusoidally Coded Speech
音频编解码器五大模块之:T
瑞典皇家理工学院工程实例:Acoustic measurement system
VOIP Codec 三剑客之 ISAC/ILBC ISAC (5) LPC Parameter Encode 模块
通信语音音质评估:
Frank Klemm's Musepack Page
瑞典皇家理工学院工程实例:Sound localization
Frank Klemm's Dither and Noise Shaping Page: Dither and Noise Shaping In MPC/MP+
原文地址:https://www.cnblogs.com/a121984376/p/1245906.html
最新文章
MagicAjax问题集(一)
[原创]SQL Server 2005 镜像构建手册
MagicAjax问题集(二)
毛茛五笔
Microsoft Virtual PC 2004 SP1 简体中文语言包(2006831最新更新)
C#编写的Unicode文本空行去除器
opticom 语音质量验证白皮书
转:电台应用受追捧 获B轮超2000万美元投资
1986年讲MDCT的基础性论文
瑞典皇家理工学院工程实例:Subband Mixed Excitation LPC Vocoder In IP TELEPHONY
热门文章
Audio Codec : QDesign
纽约大学理工学院:MULTIMEDIA SIGNAL COMPRESSION: SPEECH AND
纽约大学理工学院:EE3414 Multimedia Communication Systems I
瑞典皇家理工学院工程实例:A stateoftheart speech coding algorithm
突发奇想的应用(1):WIFI类Ipad和Ipod touch的离线微博
关于WebRTC,各种开源Codec和F22战斗机
VOIP Codec 三剑客之 ISAC/ILBC ISAC (3) High Band Encode 模块
VOIP Codec 三剑客之 ISAC/ILBC ISAC (2) Low Band Encode 模块
转迈阿密大学的一个项目:28.8Kpbs下的MPEG Layer2 编码方案
转: Visual Studio 调试小技巧(1)根据字符串内容添加断点
Copyright © 2011-2022 走看看