ControllerStandardDataItemClassIndexItemClickToDetails Property |
Namespace: SOWIWeb.Helper
This option implemented in view partial ..\SOWIWeb\Views\Shared\_IndexContentDataTablesPartial.cshtml
Option value read from ViewBag
string lIndexItemClickToDetailsCommand = ""; if (ViewBag.IndexItemClickToDetails != null) { if ((bool)ViewBag.IndexItemClickToDetails) { lIndexItemClickToDetailsCommand = " onclick=" + "DataItemDetails(this.id)"; } }
<td id="@item.ID" @lIndexItemClickToDetailsCommand>@Html.Raw(lValue.ToHTMLDisplay(itemDataGrid, TempData))</td>
function DataItemDetails(value) { var lDetailsID = document.getElementById('DetailsID'); lDetailsID.value = value; window.location.href = '@Url.Action("Details")/' + value; }