asp.net mvc 3 - How to display dynamic Html.ActionLink label? -
this code works, displays "details" every row of table:
@appsgrid.gethtml( tablestyle: "table", headerstyle: "head", alternatingrowstyle: "alt", columns: appsgrid.columns( appsgrid.column(columnname: "code", header: "", format: (item) => html.actionlink("details", "index", "applicationtechstack", new {code = item.code}, null ),
however, when try change line format: (item) => html.actionlink(item.code,
gives me error. how come? item of class has code property, visible in other parts - returns routing values fine... needs done display hyperlink text dynamically? oh, i'm on mvc 3.
try this. displaytext
dynamic value.
`columns: appsgrid.columns( appsgrid.column(columnname: "code", header: "", format: (item) => html.actionlink((string)item.displaytext, "index", "applicationtechstack", new {code = item.code}, null),
Comments
Post a Comment