码迷,mamicode.com
首页 > 其他好文 > 详细

easyUI datagrid 双击某一行弹出dialog

时间:2015-03-05 18:39:35      阅读:3817      评论:0      收藏:0      [点我收藏+]

标签:

  1.  jQuery(‘#user-grid‘).datagrid({  
  2.             url: basePath + ‘user-manager-list.html‘,  
  3.             width: 870,  
  4.             height: 338,  
  5.             fitColumns: true,  
  6.             pagination:true,  
  7.             rowIndex:‘login_name‘,  
  8.             singleSelect:true,  
  9.             toolbar:  
  10.                     [  
  11.                         {text:‘添加‘,iconCls :‘icon-add‘,handler:newUser} ,  
  12.                         {text:‘编辑, iconCls:‘icon-edit‘, handler:editUser },  
  13.                         {text:‘删除, iconCls:‘icon-remove‘,handler:removeUser }  
  14.                     ],  
  15. // 双击函数
  16.             onDblClickRow:function() {  
  17.                 editUser();  
  18.             },  
  19.             columns:[  
  20.                 [  
  21.                     {field:‘login_name‘,title:‘登录名称,width:120},  
  22.                     {field:‘employ_id‘,title:‘员工号码,width:80},  
  23.                     {field:‘email‘,title:‘邮件地址,width:200,align:‘right‘},  
  24.                     {field:‘status‘,title:‘状态,width:200,align:‘center‘},  
  25.                     {field:‘expiry_date‘,title:‘到期日期‘,width:160},  
  26.                     {field:‘create_date‘,title:‘创建日期,width:160,align:‘center‘}  
  27.                 ]  
  28.             ]  
  29.         });  
  30.   
  31. }  
  32.   
  33. </script>  
  34.   
  35. var customOBJ;  
  36. $(‘#customobjList‘).datagrid({     
  37.                 width:500,   
  38.                 height:200,   
  39.                 pageSize:5,  
  40.                 pageList:[5,15,20,25,30,35,40],  
  41.                 singleSelect:true,  
  42.                 nowrap:false,  
  43.                 url:‘${basePath}/marketPlat/addDataServlet?method=seachOwnCustomobj‘,  
  44.                 onLoadSuccess:function(data){  
  45.                     //alert(data.rows.length);  
  46.                 },  
  47. // 双击函数
  48.                 onDblClickRow:function(rowIndex, rowData){  
  49.                     customOBJ=new Object();                      
  50.                     customOBJ.customobjId=rowData.customObjId;  
  51.                     customOBJ.customobjName=rowData.name;  
  52.                     setCustomobjName(customOBJ);  
  53.             //其中rowData.customObjId 对应后天的json数据   
  54.             show(customOBJ.customobjId);  
  55.                 },  
  56.                 columns:[[              
  57.                     {field:‘name‘,title:‘客户单位全称‘,width:180,align:‘left‘,  
  58.                         formatter:function(value,rowData,rowIndex){  
  59.                             //alert(value);  
  60.                             return value;  
  61.                         }  
  62.                     },  
  63.                     {field:‘industry‘,title:‘所属行业‘,width:150,align:‘center‘},  
  64.                     {field:‘regionType‘,title:‘客户类别‘,width:150,align:‘center‘}  
  65.                 ]],  
  66.                 pagination:true  
  67.             });      
  68. function show(id)  
  69. {  
  70. var url=‘${basePath}/page/marketPlat2/addData/seachProduct_list.jsp?type=‘+id;  
  71.     var productWin=$(‘#product-window‘).window({  
  72.             href:url,  
  73.             title:‘选择产品‘,              
  74.             closed: true,  
  75.             minimizable:false,  
  76.             collapsible:false,  
  77.             maximizable:false,      
  78.             cache:false,  
  79.             shadow:false  
  80.         });  
  81. productWin.window(‘open‘);  
  82. }  

easyUI datagrid 双击某一行弹出dialog

标签:

原文地址:http://www.cnblogs.com/qinse/p/4316213.html

(1)
(1)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!