Reputation: 68750
I have a grid which currently uses an ActionLink in a column:
columns.Bound(p => p.ID)
.Template(@<text>
@Html.ActionLink("Edit", "Index",
"ManageUser", new { id= @item.ID}, null)
</text>);
The above Action in our app has been changed and can now only receive Posts. How do I change the above code to post the id to the ManageUser controller when the link is clicked in the column?
I have tried to put a form in the column like this, but it doesn't render the form tags:
columns.Bound(p => p.ID)
.Template(@<text>
@Html.BeginForm("Index", "ManageUser", new {id= @item.ID})
{
<a "javascript to post">@item.ID</a>
}
</text>);
Upvotes: 0
Views: 1181
Reputation: 20203
Try to change your Grid to be rendered like this to the page.
from: $(Html.Kendo().Grid...)
to:
${
Html.Kendo().Grid...
.Render();
}
And see if the forms are generated. ALso you will need to either submit the forms programatically or add submit button.
Upvotes: 1