• easyUI datagrid 双击某一行弹出dialog


    1.  jQuery('#user-grid').datagrid({  
    2.             url: basePath + 'user-manager-list.html',  
    3.              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:'登录名称,120},  
    22.                     {field:'employ_id',title:'员工号码,80},  
    23.                     {field:'email',title:'邮件地址,200,align:'right'},  
    24.                     {field:'status',title:'状态,200,align:'center'},  
    25.                     {field:'expiry_date',title:'到期日期',160},  
    26.                     {field:'create_date',title:'创建日期,160,align:'center'}  
    27.                 ]  
    28.             ]  
    29.         });  
    30.   
    31. }  
    32.   
    33. </script>  
    34.   
    35. var customOBJ;  
    36. $('#customobjList').datagrid({     
    37.                 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:'客户单位全称',180,align:'left',  
    58.                         formatter:function(value,rowData,rowIndex){  
    59.                             //alert(value);  
    60.                             return value;  
    61.                         }  
    62.                     },  
    63.                     {field:'industry',title:'所属行业',150,align:'center'},  
    64.                     {field:'regionType',title:'客户类别',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. }  
  • 相关阅读:
    java 实现N进制转M进制
    BigInteger构造函数解析
    SpringBoot 实现前后端分离的跨域访问(CORS)
    python:[numpy] ndarray 与 list 互相转换
    PyTorch使用GPU的方法
    Matplotlib.pyplot 把画图保存为图片 指定图片大小
    python列表中的所有值转换为字符串,以及列表拼接成一个字符串
    python 读取中文文件名/中文路径
    在Python中使用LSTM和PyTorch进行时间序列预测(深度学习时序数据预测)
    记录分析python程序运行时间的几种方法
  • 原文地址:https://www.cnblogs.com/qinse/p/4316213.html
Copyright © 2020-2023  润新知