or
.DataSource(dataSource => dataSource .Ajax() .Model(model => { model.Id(g => g.id); model.Field(g => g.id).Editable(false); model.Field(g => g.user_id); model.Field(g => g.group_id); }) .Create(c => c.Url("http://localhost:808/api/UserGroup").Type(HttpVerbs.Post)) .Update(update => update.Url("http://localhost:808/api/UserGroup").Type(HttpVerbs.Put)) .Destroy(destroy => destroy.Url("http://localhost:808/api/UserGroup").Type(HttpVerbs.Delete)) )OPTIONS http://localhost:808/api/UserGroup 405 (Method Not Allowed) jquery.min.js:2OPTIONS http://localhost:808/api/UserGroup 405 (Method Not Allowed) jquery.min.js:2DELETE http://localhost:808/api/UserGroup 404 (Not Found) UserGroup:1XHR finished loading: "http://localhost:808/api/UserGroup".columns.Command(commands =>{ commands.Edit(); @<text> @if (!item.IsStartPage) { commands.Destroy(); } </text>;})columns.Command(commands =>{ commands.Edit(); commands.Destroy(!item.IsStartPage);})public class ReportMonthTotals{ public string Month { get; set; } public int Year { get; set; } public decimal Total { get; set; }}1 2013 1200.0012 2012 1350.0011 2012 1100.0010 2012 1050.00@(Html.Kendo().Chart<Reporting.Data.SalesModel.ReportMonthTotals>() .Name("salesChart") .Title("Sales") .Legend(legend => legend .Position(ChartLegendPosition.Bottom) ) .Series(series => { series.Line(m => m.Total); }) .ValueAxis(axis => axis.Numeric() .Labels(labels => labels .Format("${0}") ) ) .CategoryAxis(axis => axis .Categories(m => m.Month) ) .DataSource(dataSource => dataSource .Read(read => read.Action("Sales_Read", "Sales")
.Group(group => group.Add(m => m.Year))
))public ActionResult Sales_Read([DataSourceRequest] DataSourceRequest request){ return Json(SalesModel.GetSales(), JsonRequestBehavior.AllowGet);}@(Html.Kendo().Grid<Models.AgentLeaderData>() .Name("AgentLeaderData") .Columns(col => { col.Bound(p => p.AgentName); col.Bound(p => p.Revenue).HtmlAttributes(new { style = "text-align:right" }); }) .BindTo(Model.AgentLeaderData))@(Html.Kendo().TreeView() .Name("OrganisationTreeview") .ExpandAll(true) .BindTo(Model, mapping => mapping .For<Organisation>(binding => binding .Children(organisation => organisation.ChildOrganisations) .ItemDataBound((item, organisation) => { item.Text = organisation.organisation_unit_name; item.Id = organisation.organisation_unit_id.ToString(); if (organisation.organisation_type_id == 1) { item.HtmlAttributes.Add("style", "font-size: 18px;font-weight:bold;"); } else if (organisation.organisation_type_id == 3) { item.HtmlAttributes.Add("style", "font-size: 14px;font-weight:bold"); } else if (organisation.organisation_type_id == 2) { item.HtmlAttributes.Add("style", "font-size: 12px;font-weight:normal"); } }))))$("*[data-add-team]").click(function () { var win = $("#teamWindow") win.show().data("kendoWindow").open().center().toFront();}) <div data-menu-item="teams"> @code Dim TeamCreateWindows As Kendo.Mvc.UI.Window = Html.Kendo.Window() _ .Name("teamWindow") _ .Title("Create Team") _ .Actions(Sub(actions) actions.Custom("custom") actions.Minimize() actions.Maximize() actions.Close() End Sub) _ .LoadContentFrom("create", "team", New With {.area = "contractor"}).Animation(True) _ .Content(Sub() @<text> Loading....... </text> End Sub) _ .Draggable().Resizable().Width(500) TeamCreateWindows.Render()End Code @Html.Button("addTeam", "Add Team", BO.Enumerators.ButtonType.Button, BO.Enumerators.ButtonStyle.LoLight, New With {.data_add_team = True}) @Html.Partial("_Teams", Model.Contractor) </div>