jquery datatables双击,获取行号。

function dbClickDatatables(rows)
{
$("#@(Perfix)tbData tbody tr").dblclick(function(e){
debugger;
var index = $(this).context._DT_RowIndex; //行号
// var rows = $('#@(Perfix)tbData').dataTable().api().rows().data();
var paramString='';
for (i = 0; i < rows.length; i++) {
if (rows[i].RowOrder==index)
{
paramString="ID="+rows[i].ID;
break;
}
}
perfix = 'OQCInspectionSampleV2ItemDetail';
IQCBase.showDetail({
id: '@(Perfix)DetailDialog',
url: '/IQC/OQCInspectionSampleV2/ItemDetail',
paramString: paramString,
onShown: function () {

IQCBase.INSDetailOnShown(@(Perfix)editorID, '@(Perfix)tbData', perfix, index, true);
},
onHidden: function () {
var editor = UE.getEditor(@(Perfix)editorID);
if (editor) {
editor.destroy();
editor = null;
}
}
});

});
}

  

原文地址:https://www.cnblogs.com/chenli0513/p/5692555.html