or
@(Html.Kendo().Chart<WT_Portal_PMS2.Models.OpenClockSummary>() .Name("chart") .Title("Open Clocks by Weeks Waiting") .Theme("bootstrap") .Legend(legend => legend .Position(ChartLegendPosition.Top) .Visible(false) ) .DataSource(ds => ds.Read(read => read.Action("_BarChartp", "Summary") .Data("specFilter") )) .Series(series => { series.Column(model => model.Clocks, model => model.barColour); }) .ChartArea(area => area .Height(350) .Background("transparent")) .CategoryAxis(axis => axis .Categories(model => model.CurrentWaitingBand) .Labels(labels => labels.Rotation(-90)) .MajorGridLines(lines => lines.Visible(false)) ) .ValueAxis(axis => axis.Numeric() .Labels(labels => labels.Format("{0:N0}")) .Line(line => line.Visible(false)) ) .Tooltip(tooltip => tooltip .Visible(true) .Format("{0:N0}") ) )<span>Open Clocks by Weeks Waiting</span> <span class="pull-right badge">C1</span>$.ajax( { url: '@Url.Action("GetThrowData", "UserConsoleViewModels")', type: 'POST', dataType: 'json', data: { throwId: _throwId } } ).done( function (response) { console.log(response); $("#direction").text(response.Data.Action); $("#lblRawData").text(response.Data.RawData); } ).error( function (xhr, status, error) { alert(xhr.responseText); }); @(Html.Kendo().Chart() .Name("currentGraph") .Title("Switch Current Graph") .Legend(legend => legend .Position(ChartLegendPosition.Bottom) ) .ValueAxis(axis => axis.Numeric() .Labels(labels => labels.Format("{0}")) .Title("Current") ).HtmlAttributes(new { style = "height:300px" }) .Tooltip(tooltip => tooltip .Visible(true) .Format("{0}") ))[DisplayName("Activate Date")]public DateTimeOffset? activateDate { get; set; }[DisplayName("Inactivate Date")]public DateTimeOffset? inactivateDate { get; set; }[DisplayName("Energizing Date")]public DateTimeOffset? energizingDate { get; set; }var x = dao.CONNECTIVITY_UNIT .Join(dao.OP_AREA_ORG, cu => cu.OP_AREA_CODE, oa => oa.OP_AREA_CODE, (cu, oa) => new { CONNECTIVITY_UNIT = cu, OP_AREA_ORG = oa }) .Where(w => w.CONNECTIVITY_UNIT.UNIT_TYPE.Equals("SUBSTATION")) .Where(w => w.CONNECTIVITY_UNIT.IS_ACTIVE_FLAG.ToUpper().Equals("Y")) .Where(w => w.CONNECTIVITY_UNIT.ABBR.ToUpper().Equals("BRA")) .Select(c => new SubstationVM { energizingDate = c.CONNECTIVITY_UNIT.ENERGIZING_DATE, activateDate = c.CONNECTIVITY_UNIT.ACTIVATE_DATE, inactivateDate = c.CONNECTIVITY_UNIT.INACTIVATE_DATE, updateTime = c.CONNECTIVITY_UNIT.UPDATE_TMSTMP }) .OrderBy(o => o.substationABBR) .ToList();return x;<div class="form-group"> @Html.LabelFor(model => model.energizingDate, new { @class = "control-label col-xs-2" }) <div class="col-xs-2"> @Html.EditorFor(model => model.energizingDate) @Html.ValidationMessageFor(model => model.energizingDate) </div> <div class="col-xs-3"> <div class="form-group"> @Html.LabelFor(model => model.activateDate, new { @class = "control-label col-xs-4" }) <div class="col-xs-7"> @Html.EditorFor(model => model.activateDate) @Html.ValidationMessageFor(model => model.activateDate) </div> </div> </div> <div class="col-xs-3"> <div class="form-group"> @Html.LabelFor(model => model.inactivateDate, new { @class = "control-label col-xs-4" }) <div class="col-xs-7"> @Html.EditorFor(model => model.inactivateDate) @Html.ValidationMessageFor(model => model.inactivateDate) </div> </div> </div></div>@(Html.Kendo().Grid<AppUser>() .Name("grid") .Columns(columns => { columns.Bound(c => c.Name).Width(140); columns.Bound(c => c.HomeAddress).Width(140); columns.Bound(c => c.BizAddress).Width(140); }) .HtmlAttributes(new { style = "height: 380px;" }) .Scrollable() .Groupable() .Sortable() .Selectable() .Events(events => events.Change("grid_change")) .Pageable(pageable => pageable .Refresh(true) .PageSizes(true) .ButtonCount(5)) .DataSource(dataSource => dataSource .Ajax() .Read(read => read.Action("FilteredPeople_Read", "UserConsoleViewModels")) ))<script> function grid_change(e) { var data = this.dataItem(this.select()); if (clickedColumnIndex != 0) // How do I find selectedColumnIndex? { $("#labelName").text(data.Name); $("#labelAddress").text(selectedColumnIndex == 1 ? data.HomeAddress : data.BizAddress); } }</script>