This question is locked. New answers and comments are not allowed.
I am trying to add a hyperlink to a row for a particular column in a grid. I have the hyper link being added, but I am having trouble passing another item in my model via the hyperlink.
The section that says item.Id is where I am trying to pass an id to the javascript function rather than the name that is currently in the column. How do I accomplish this?
Thanks for your help
@model IEnumerable<McK.BI.BusinessLayer.ViewModels.HighlightListing><div id="result"> @(Html.Telerik().Grid(Model) .Name("Grid") .HtmlAttributes(new { style = "border: 0;" }) .Columns(columns => { columns.Bound(h => h.IsStateNew).Title("New"); columns.Bound(h => h.AlertStatus).Title("Status"); columns.Bound(h => h.State); columns.Bound(h => h.Type).Title("Type"); columns.Bound(h => h.Name).Format(Html.ActionLink("{0}", "Open", "Work", new { workindex = 3, OtherParms = item.Id }, null).ToString()).Encoded(false); columns.Bound(h => h.EntityName).Title("Entity"); columns.Bound(h => h.DescriptionState).Title("Desc"); columns.Bound(h => h.LastChangeDate).Format("{0:MM/dd/yyyy}").Width(120).Title("Modified"); }) .Scrollable() .Resizable(resizing => resizing.Columns(true)) ) </div><script type="text/javascript"> function loadEditForm(element, e) { // avoid navigating by calling preventDefault - http://api.jquery.com/event.preventDefault/ new $.Event(e).preventDefault(); // use the jQuery load method (http://api.jquery.com/load/) to request the partial view // #result is the DIV where the partial view will be loaded $('#result').load(element.href); }</script>The section that says item.Id is where I am trying to pass an id to the javascript function rather than the name that is currently in the column. How do I accomplish this?
Thanks for your help