settings.Columns.Add(m => m.Name, column =>
{
column.SetDataItemTemplateContent(content =>
{
ViewContext.Writer.Write(
Html.ActionLink(Context.Text, "Action", "Controller", new { foo =
DataBinder.Eval(content.DataItem, "Name")}, null).ToHtmlString()
);
});
});
Yes, you have to have that null. Trust me.
No comments:
Post a Comment