html.actionlink in jqgrid
i am trying to get a column with an html.actionlink into a jqgrid? any ideas ? any other grid sugge开发者_StackOverflow社区stions welcome too. ta
don't need to use telerik for column with an html.actionlink. We can use this in jqGrid itself . Below are the code.
{ 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
}
or
{ 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
}
Its working fine for me
You can try telerik extensions for asp.net mvc. i used it personally and found it really good. here is link to demo page. its open source
精彩评论