当用户点击一个链接时显示一个模式弹出框jqgrid

问题描述:

{ 
     name: 'EmployeeInformation', 
     index: 'EmployeeInformation', 
     width: 15, 
     sortable: true, 
     editable: false, 
     formatter: 'showlink', 
     formatoptions: { 
      //show an modal popup 
     } 
    } 

这是我的jqgrid中的一个表列。当用户点击一个链接时显示一个模式弹出框jqgrid

我想要的是当我点击链接按钮(EmployeeInformation)时,它会显示一个模式弹出。

+0

如果不知道哪个模态插件在 – 2014-09-24 05:17:18

+0

这是因为我还没有任何模态插件,代码是没用的。你能开导我吗? Zee Tee? – 2014-09-25 00:14:55

最简单的方法是使用formatter: 'dynamicLink'代替我在the answer中介绍的formatter: 'showlink'。它允许您定义onClick回调(formatoptions: {onClick: function (rowid, iRow, iCol, cellText, e) {alert('clicked in rowId=' + rowId + ', iRow=' + iRow + ', iCol=' + iCol);}}),如the demo。请参阅here

另一种方式将是定义只是<span>text-decoration: underline; cursor: pointer;风格,而不是<a>和使用beforeSelectRowonCellSelect检测点击栏,显示相应的模式弹出。请参阅the answer,this one,this one和其他相应的代码示例。