重置以前选定的行并突出显示inlinenav JQGrid中的新行

时间:2015-04-23 11:26:38

标签: jquery jqgrid

如何重置以前选定的行并突出显示inlinenav JQGrid中的新行。请帮忙..

var lastSel = null;
function onSelectRow(id) {
if (lastSel != id) {
    $("#ProgramListGird").jqGrid('restoreRow', lastSel, function () { });
    //$('#ProgramListGird').jqGrid('resetSelection', lastSel, true); 
    lastSel = id;
}
$("programListGird").setSelection(id);
editparameters = {
    "keys": false,
    "oneditfunc": null,
    "successfunc": null,
    "url": null,
    "extraparam": {},
    "aftersavefunc": null,
    "errorfunc": null,
    "afterrestorefunc": null,
    "restoreAfterError": true,
    "mtype": "POST"
}
$("#ProgramListGird").jqGrid('editRow', id, editparameters);   
 }

// $('#ProgramListGird')。jqGrid(' resetSelection',lastSel,true); - 如果我使用这行代码,那么我的恢复功能不起作用。意味着,在每一行上选择行进入编辑模式但不恢复,这实际上是一种错误的行为。请帮忙..

2 个答案:

答案 0 :(得分:0)

通常在方法中添加[STAThread]属性可以解决问题。 例如:

Dim result = (From a In list1
              Group Join b In list2 
                  On a.Value Equals b.Value 
                  Into grp = Group
              Where Not grp.Any
              Select a)

答案 1 :(得分:0)

当您想要访问OLE函数(如复制到剪贴板)时,您需要一个单独的线程应用程序。

[STAThread]
public static void Main()
{
    ...        
}

但也许这可以帮助你ZeroClipboard for copy to clipboard in ASP.NET MVC ......

相关问题