mercredi 19 août 2015

ActionLink from js

How to call ActionLink from javascript (jqgrid)? I tried this:{ name: 'LinkButton', formatter: function (cellvalue, options, rowObject) { var x = '@Html.ActionLink( "Edit", Edit1","HomeController",new { id=item.BillboardID })'; return x.replace("myId", rowObject[]); }, sortable: false, align: 'left', width: 100 }

But in column no link, only text, like this:

|"@Html.ActionLink( "Edit", Edit1"..."|

|"@Html.ActionLink( "Edit", Edit1"..."|

|"@Html.ActionLink( "Edit", Edit1"..."|

Aucun commentaire:

Enregistrer un commentaire