asp.net mvc - MVC Kendo Grid Hyperlink column -
i want first column 'name' should 'hyperlink' template .but value should binded model hyper link each link have different name comes property of model. how this? tried in following way working .!!
but getting rows first column's hyperlink text "show product details". want model values. don't want same columns
@(html.kendo().grid<cutomers.model.customerdatamodel>() .name("grid") .columns(columns => { columns.bound(p => p.name).clienttemplate("<a href='" +url.action("productdetails", "product") +"/#= filename #'" +">show product details</a>"); columns.bound(c => c.createddate).width(70); columns.bound(c => c.createdby).width(70); }) .htmlattributes(new { style = "height: 350px;" }) .scrollable() .groupable() .sortable() .pageable(pageable => pageable .refresh(true) .pagesizes(true) .buttoncount(1)) .datasource(datasource => datasource .ajax() .read(read => read.action("customers_read", "home")) ) )
i don't think can use razor syntax in there, try..
.clienttemplate("<a href=\"controller/action/#modelpropertyhere#\">#anothermodelpropertyhere#</a>")
Comments
Post a Comment