开发者

html.actionlink in jqgrid

开发者 https://www.devze.com 2023-02-23 02:53 出处:网络
i am trying to get a column with an html.actionlink into a jqgrid? any ideas ? any other grid sugge开发者_StackOverflow社区stions welcome too. tadon\'t need to use telerik for column with an html.acti

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号