我正在使用 jqGrid,在第一次单击单元格时,sel_id 为空:
function onCellSelect(rowid, iCol, cellcontent, e) {
var DownlinkIndex = 7;
var UplinkIndex = 8;
var SalCodeIndex = 3;
if (iCol == DownlinkIndex) {
var grid = jQuery('#SalesPersonList');
var sel_id = grid.jqGrid('getGridParam', 'selrow');
var myCellData = grid.jqGrid('getCell', sel_id, 'Salespersonid');
var mySalName = grid.jqGrid('getCell', sel_id, 'Name');
ShowDownLink(myCellData, mySalName);
}
if (iCol == UplinkIndex) {
var grid = jQuery('#SalesPersonList');
var sel_id = grid.jqGrid('getGridParam', 'selrow');
var myCellData = grid.jqGrid('getCell', sel_id, 'Salespersonid');
var mySalName = grid.jqGrid('getCell', sel_id, 'Name');
ShowUpLink(myCellData, mySalName);
}
}
正在触发事件方法。正在填充 4 个参数。但在第一次点击时,它始终为空。然后在第二次点击时,它被设置为第一次点击。然后将第 3 次单击设置为第 2 次单击。奥列格,如果你能提供帮助,我将不胜感激。