This question is locked. New answers and comments are not allowed.
Hi all,
if I do the following then all works fine.
this works because RiskID is on the Model as a datakey.
If I want to obtain a non key value at each level. THen if I do the following on an ActionLink code is still fine.
Notice to use @item I have had to wrap in a @<text>
This is where my problem now begins. for the @Html.Encode, I cannot use the same format How should I inject my item values into the encode?
if I do the following then all works fine.
columns.Bound(r => r.RiskID) .ClientTemplate( @Html.ActionLink("Edit", "Edit", "ProfessionalIndemnityRisk", new { riskID = "<#= RiskID #>" }, null).ToHtmlString() + " " + @Html.Encode("<a class='deleteRisk' href='#' riskID='<#= RiskID #>', url='ProfessionalIndemnityRisk/DeleteRisk', gridName='risksGrid'>Delete</a>")) If I want to obtain a non key value at each level. THen if I do the following on an ActionLink code is still fine.
@<text>@Html.ActionLink("Edit", "Edit",@item.ControllerName, new { { sectionID = @item.SectionID, policyZoneID = Model.PolicyZoneID }, null) </text>Notice to use @item I have had to wrap in a @<text>
This is where my problem now begins. for the @Html.Encode, I cannot use the same format How should I inject my item values into the encode?