Extjs的gridPanel中列点击图片调用方法
2013-10-27 13:53
447 查看
在Ext的gridPanel列添加了图片,实现点击图片调用某个方法
之前先定义 function showdesc(){}
具体代码如下
之前先定义 function showdesc(){}
具体代码如下
<script type="text/javascript"> function showdesc(rcid) { alert(rcid);//这里可以实现点击图片的方法 }; Ext.onReady(function(){ new Ext.grid.GridPanel({ border:true, frame:true, height:200, width:300, store:new Ext.data.SimpleStore({ fields:["CityID","CityName","business","desc"], data:[["AH","安徽","安徽事业部"],["BJ","北京","北京事业部"],["XM","厦门","厦门事业部"]]}), renderTo:'resultGrid', columns:[{ header:'城市', width:80, dataIndex:'CityID', sortable: true },{ header:'城市名称', width:80, dataIndex:'CityName', sortable: true },{ header:'所属事业部', width:80, dataIndex:'business', sortable: true },{ header:'详情查看', width:80, dataIndex:'desc', sortable: true, renderer:function(value){ return String.format( '<input id="show" type=image src=./images/show.gif title="show" onclick="showdesc(\'aa\')"/>' ); } }]}) }) </script>
相关文章推荐
- 两种方法实现点击图片调用上传功能
- thinkPHP5.0框架验证码调用及点击图片刷新简单实现方法
- iOS App中调用相册中图片及获取最近的一张图片的方法
- 织梦DEDECMS上一篇下一篇调用图片的方法
- Android调用系统拍照裁剪图片模糊的解决方法
- Flex中mx:Image组件动态调用Tomcat工程以外图片的方法
- 调用系统拍照获取的图片方向问题解决方法
- JS点击链接后慢慢展开隐藏着图片的方法
- destoon调用discuz论坛中带图片帖子的实现方法
- jQuery实现点击图片翻页展示效果的方法
- hrml5图片上传或者调用阿里百川的方法上传
- c# 给button添加不规则的图片以及用pictureBox替代button响应点击事件的方法
- 织梦DedeCMS列表页、内页调用图集多张图片的方法
- iOS - 调用相机相册的方法 + 上传图片
- Android中performClick方法---代码调用点击事件(模拟去触摸控件)
- 点击图片更新验证码的方法
- DEDE列表页调用文章内容第一张图片(非缩略图)方法
- DEDE首页调用DZ论坛图片的方法
- Qt 中实现在控件中点击鼠标,就在鼠标点击处加载图片的方法
- 点击按钮显示图片的两种方法