为Infragistics UltraWebGrid 行中的按钮添加操作确认提示
来源:互联网 发布:盼盼是什么交友软件 编辑:程序博客网 时间:2024/04/30 00:00
在项目的开发中应用了Infragistics.WebUI.UltraWebGrid这个控件,并把其中的两列设置为了“按钮”列,其中的一个按钮是实现页面跳转的功能,不需要提示,而另一列是实现对该行记录的删除功能,需要在删除前显示一个删除确认提示。经过推敲,找到解决的办法,具体做法如下:
一、在UltraWebGrid的属性中找到:DisplayLayout —> ClientSizeEvents —> ClickCellButtonHandler,点击此处,会出现“Add new handler...”提示,点击这个提示,在出现的对话框中为要添加的客户端事件命名(如:CellButtonClick),点击“OK”按钮。客户端脚本事件添加成功。
二、切换到UltraWebGrid所在页面的代码视图下,会看到自动添加的如下脚本:
<script id="Infragistics" type="text/javascript">
<!--
function CellButtonClick(gridName, cellId)...{
//Add code to handle your event here.
}// -->
<!--
function CellButtonClick(gridName, cellId)...{
//Add code to handle your event here.
}// -->
在脚本方法中添加脚本:
<script id="Infragistics" type="text/javascript">
<!--
function CellButtonClick(gridName, cellId)...{
//Add code to handle your event here.
//分析参数cellId的格式为:grid的ID+"rc_"+行索引+"_"+列索引 (如UltraWebGrid1rc_4_5)
//可以用以下方法获取按钮所在的列索引
var colId = cellId.substring(cellId.indexOf('_')+1);
colId = colId.substring(colId.indexOf('_')+1);
//根据索引的值,为相应列的按钮添加提示
if(colId==6)
...{
return(!confirm('你确定要删除该报表吗?'));
}
}// -->
<!--
function CellButtonClick(gridName, cellId)...{
//Add code to handle your event here.
//分析参数cellId的格式为:grid的ID+"rc_"+行索引+"_"+列索引 (如UltraWebGrid1rc_4_5)
//可以用以下方法获取按钮所在的列索引
var colId = cellId.substring(cellId.indexOf('_')+1);
colId = colId.substring(colId.indexOf('_')+1);
//根据索引的值,为相应列的按钮添加提示
if(colId==6)
...{
return(!confirm('你确定要删除该报表吗?'));
}
}// -->
经过如上步骤地处理,就可以为Infragistics UltraWebGrid 行中的按钮添加操作确认提示了。如还有其它方法,欢迎探讨。
- 为Infragistics UltraWebGrid 行中的按钮添加操作确认提示
- 为Infragistics UltraWebGrid 行中的按钮添加操作确认提示
- 为UltraWebGrid 行中的按钮添加操作确认提示
- Griview中的删除按钮添加“确认提示”
- 给按钮添加确认提示
- 关于Infragistics.WebUI.UltraWebGrid按钮的使用
- 给按钮添加提示对话框,确认-取消
- 添加删除、更新按钮的提示确认信息,以及DATAGRID的添加、插入、更新、删除操作。
- [原创]VB.net技巧之八----为DataGrid中的按钮添加确认按钮
- 为gridview中CommandField字段中的删除按钮添加提示
- 为按钮控件添加提示
- Infragistics:UltraWebGrid使用
- 在Infragistics UltraWebGrid 任意位置插入新行
- 为GRIDVIEW“删除”列和Button按钮添加确认对话框
- ASP.NET中为GridView添加删除确认提示框
- Infragistics NetAdvantage UltraWebGrid使用技巧
- 制作Infragistics.WebUI.UltraWebGrid树型
- Infragistics.WebUI.UltraWebGrid 小抒
- matlab的随机数
- java面试题集
- Java性能优化技巧集锦
- oracle 9i以上最有效率的if(exists)update else insert操作
- 团队作战
- 为Infragistics UltraWebGrid 行中的按钮添加操作确认提示
- 活动目录.NET编程Tips
- TopStyle 剪贴库文件 文件位置
- 使用System.DirectoryServices.Protocols实现对AD的简单操作
- VS2005 web程序自定义安装包的制作
- 排序算法
- 波士堂
- 折半查找算法 和 分块查找算法
- Effective C#中文版:改善C#程序的50种方法[目录]