or
<div class="col-md-7 col-sm-6"> @(Html.Kendo().NumericTextBoxFor(m => m.MaintenanceYearlyAmount).Decimals(1).Deferred(true)) @Html.ValidationMessageFor(m => m.MaintenanceYearlyAmount)</div>[Display(Name = "Annual Maintenance")][Required][Range(0,1000)][ToolTip("Dependant's Annual Maintenance")]public decimal? MaintenanceYearlyAmount{ get { return ModelEntity.MaintenanceYearlyAmount; } set { ModelEntity.MaintenanceYearlyAmount = value; }}@model IEnumerable<LoanFee>@{ ViewBag.Title = "Fees";}@(Html.Kendo().Grid<LoanFee>(Model) .Name("Grid") .Columns(columns => { columns.Command(cmd => cmd.Select()) .HtmlAttributes(new { style = "text-align: center;" }) .Width(100); columns.Bound(p => p.AccountNumber) .Width(170); columns.Bound(p => p.CustomerName); columns.Bound(p => p.StatusId) .Template(@<text></text>) .HtmlAttributes(new { @class = "status-dropdown" }) .ClientTemplate(Html.Kendo().DropDownList() .Name("ddlStatus_#=LoanFeeId#") .DataTextField("Name") .DataValueField("Value") .BindTo(Status.Items()) .Value("#=StatusId#") .ToClientTemplate() .ToHtmlString()) .Title("Status") .Width(100); columns.Bound(p => p.Approvals) .HtmlAttributes(new { style = "text-align: center;" }) .Width(100); columns.Bound(p => p.Amount) .Format(Formats.CURRENCY) .HtmlAttributes(new { style = "text-align: right;" }) .Width(120); columns.Bound(p => p.Allocation.PrimaryOfficerName) .Template(@<text></text>) .ClientTemplate("#=Allocation.PrimaryOfficerNumberDashName#") .Width(220); columns.Bound(p => p.CostCenterNumber) .Title("Cost Center") .HtmlAttributes(new { style = "text-align: center;" }) .Filterable(filterable => { filterable.Extra(false); filterable.Operators(o => o.ForString(fs => { fs.Clear(); fs.Equals("Equals"); })); filterable.UI("costCenterNumberFilter"); }) .Width(100); columns.Bound(p => p.DateEntered) .Format(Formats.DATE) .HtmlAttributes(new { style = "text-align: center;" }) .Width(100); }) .Events(e => e.DataBound("initStatusDropdown")) .Pageable() .Filterable() .DataSource(ds => ds .Ajax() .PageSize(15) .Sort(sort => sort.Add(p => p.AccountNumber)) .Model(m => { m.Id(p => p.LoanFeeId); }) .Read(read => read.Action("Index_Read", "WorkQueue")) ))<script type="text/javascript"> function initStatusDropdown(e) { $(".status-dropdown").each(function () { eval($(this).children("script") .last() .html()); }) } function costCenterNumberFilter(element) { element.kendoAutoComplete({ datasource: ["3200", "4200", "1000"] }); }</script>using Kendo.Mvc.UI;using Kendo.Mvc.Extensions;using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;namespace CommercialIncentive.Web.Areas.Fees.Controllers{ public class WorkQueueController : BaseController { public ActionResult Index() { return View(); } public ActionResult Index_Read([DataSourceRequest] DataSourceRequest request) { var data = IocContainer.Get<ILoanFeeService>() .ListAsQuery() // Returns IQuerable<LoanFee> .ToDataSourceResult(request); return Json(data); } }}public ActionResult ControllerAction(string a_tabPageSelected){ if(a_tabPageSelected == "MyTab") { /// do stuff before tab page appears }/// now display tab page using some command and return Viewreturn View("Tabsection");function onSelect(e) { var message = $(e.item).find("> .k-link").text(); $.get('/Controller/ControllerAction/?a_tabPageSelected=' + message, function (data) { $("#TabDiv").html(data); });}
@(Html.Kendo().DropDownListFor(model => model.Gender) .OptionLabel("Select Gender").BindTo(Model.GenderList).Deferred(true))@Html.ValidationMessageFor(m => m.Gender)<input type="text" value="-1" name="Gender" id="Gender" data-val-required="The Gender field is required." data-val-range-min="0" data-val-range-max="1" data-val-range="Gender is required" data-val="true" class="input-validation-error"><span data-valmsg-replace="true" data-valmsg-for="Gender" class="field-validation-error"><span for="Gender" class="">Gender is required</span></span><h3>Test Drop Down list</h3>@Html.DropDownListFor(m => m.Gender, Model.GenderList, new { @class = "dropdown-list form-control"})<script>//instantiate drop down lists$(".dropdown-list").kendoDropDownList();</script>@(Html.Kendo().Grid<DependantModel>(Model.Dependants) .Name("Dependants") .Columns(columns => {
... left out for brevity
}) .DataSource(dataSource => dataSource .Server() .Model(model => model.Id(p => p.Id)) .Destroy(update => update.Action("EditingInline_Destroy", "Grid")) ) .Deferred(true) )