0
我想獲得一個html.actionlink到一個jqgrid列?有任何想法嗎 ? 歡迎任何其他網格建議。 tahtml.actionlink jqgrid
我想獲得一個html.actionlink到一個jqgrid列?有任何想法嗎 ? 歡迎任何其他網格建議。 tahtml.actionlink jqgrid
你可以試試asp.net mvc的telerik擴展。我個人使用它,發現它非常好。 這裏是link到演示頁面。其開源
不需要使用telerik作爲html.actionlink的列。我們可以在jqGrid本身使用 。以下是代碼。
{ name: 'Restart',
formatter: function (cellvalue, options, rowObject) {
var x = '@Html.ActionLink("Restart", "Restart","Dashboard",new { requestId ="myId" }, new {@style="color:Blue;font-weight:bold;", onclick = "return confirm('Are you sure to Restart?');" })';
return x.replace("myId",rowObject[8]);
}, align: 'left', width: 100
}
或
{ name: 'Restart',
formatter: function (cellvalue, options, rowObject) {
return '@Html.ActionLink("Restart", "Restart","Dashboard",new { requestId ="yourId" }, new {@style="color:Blue;font-weight:bold;", onclick = "return confirm('Are you sure to Restart?');" })';
}, align: 'left', width: 100
}
其工作正常,我