or
<div class="k-widget k-chart" id="chart"></div><script> jQuery(function(){jQuery("#chart").kendoChart({series:[{name:"Sale Value",type:"area",field:"SaleValue"}],categoryAxis:{categories:["2007","2008","2009","2010","2011"]},dataSource:{data:[{"Year":2007,"SaleValue":250000.0000},{"Year":2008,"SaleValue":500000.0000},{"Year":2009,"SaleValue":250000.0000},{"Year":2010,"SaleValue":500000.0000},{"Year":2011,"SaleValue":250000.0000}]}});}); </script>
@(Html.Kendo().Chart(Model.AnnualSalesList)
.Name("chart")
.Series(series =>
{
series.Area(s => s.SaleValue);
})
.CategoryAxis(axis => axis
.Categories(s => s.Year))
)
@*
@(Html.Telerik().Chart(Model.AnnualSalesList)
.Name("chart")
.Legend(false)
.Series(series =>
{
series.Area(s => s.SaleValue).Name("Sales by Year");
})
.CategoryAxis(axis => axis
.Categories(s => s.Year))
.ValueAxis(axis => axis
.Numeric().Labels(labels => labels.Format("${0:#,##0}")))
.Theme("Metro")
.HtmlAttributes(new { style = "width: 450px; height: 200px; margin: auto;" })
)
*@
@(Html.Kendo().Grid<MyProject.Business.Models.EmployeDTO>().Name("EmployeGrid").ToolBar(toolbar => toolbar.Create()).Columns(cols =>{ cols.Bound(o => o.someData).Title("Some Data"); cols.Bound(o => o.moreData).Title("More Data"); cols.Command(o => { o.Edit(); o.Destroy(); }).Title(" ");}).Editable(editor => editor .Mode(GridEditMode.PopUp) .Window(window => window.Draggable().Resizable().HtmlAttributes(new { @style = "width:700px;" }))).Sortable().Filterable().Groupable().DataSource(datasource => datasource .Ajax() .Model(model => model.Id(o => o.id)) .Read(read => read.Action("GetAll", "EmployesAjax")) .Update(update => update.Action("Update", "EmployesAjax")) .Create(create => create.Action("Create", "EmployesAjax")) .Destroy(destroy => destroy.Action("Destroy", "EmployesAjax")) ))@Html.Kendo().Grid<MyProject.Business.Models.SalairyDTO>().Name("SalaryGrid").Columns(cols =>{ cols.Bound(o => o.someInfo).Title("Some Info");}).DataSource(datasource => datasource .Ajax() .Model(model => { model.Id(o => o.id); model.Field(o => o.employe_id).DefaultValue(Model.id); }) // NEED THE ID HERE .Read(read => read.Action("GetByEmployeId", "SalairyAjax", new { id = "" })) .Update(update => update.Action("Update", "SalairyAjax")) .Create(create => create.Action("Create", "SalairyAjax")) .Destroy(destroy => destroy.Action("Destroy", "SalairyAjax"))));@using (Html.BeginForm()) is working correctly.
@(Html.Kendo().Window() .Name("window") .Title("Profile:") .Content(@<text> <div>Test</div> @Html.EditorFor(y => y.ListofChoices); </text>) )<button id="get1" type="submit" >CONTINUE</button>@model ViewModels.Choice @Html.CheckBoxFor(x=>x.IsSelected) @Html.HiddenFor(x=>x.AccountResponsibilityId) @Html.LabelFor(x=>x.IsSelected, Model.AccountResponsibilityName)
@(Html.Kendo().Grid(Model) .Name("Grid") .Columns(columns => { columns.Bound(p => p.Id).Width(25); columns.Bound(p => p.Name).Width(240); columns.Bound(p => p.City).Width(170); columns.Bound(p => p.State).Width(170); columns.Command(command => { command.Edit(); command.Custom("Delete").Click("deleteIt"); }).Width(166); }) .Scrollable() .Editable(editable => editable.Mode(GridEditMode.InLine)) .DataSource(dataSource => dataSource .Ajax() .Model(model => model.Id(p => p.Id)) //.Read("PropertyRead", "Property")) .Read(read => read.Action("PropertyRead", "Property")) .Update(update => update.Action("Update", "Property")) .Destroy(destroy => destroy.Action("Delete", "Property")) ) )var n = window.kendo, r = /'/ig, i = e.extend;[...]options: {read: {type: "GET"},update: {type: "POST"},create: {type: "POST"},destroy: {type: "POST"},parameterMap: s,prefix: ""}})}})...var n = window.kendo, r = n.ui, i = e.extend, s = e.isFunction;[...]options: {read: {type: "GET"},update: {type: "POST"},create: {type: "POST"},destroy: {type: "POST"}...<div id="user-nav" class="navbar navbar-inverse"> <ul class="nav btn-group"> <li class="btn btn-inverse"><a title="" href="#"><i class="icon icon-user"></i><span class="text">Profile</span></a></li> <li class="btn btn-inverse dropdown" id="menu-messages"><a href="#" data-toggle="dropdown" data-target="#menu-messages" class="dropdown-toggle"><i class="icon icon-envelope"> </i><span class="text">Messages</span> <span class="label label-important">5</span> <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a class="sAdd" title="" href="#">new message</a></li> <li><a class="sInbox" title="" href="#">inbox</a></li> <li><a class="sOutbox" title="" href="#">outbox</a></li> <li><a class="sTrash" title="" href="#">trash</a></li> </ul> </li> </ul> </div>
@(Html.Kendo().Window() .Name("window") .Title("Role") .Content("loading...") .LoadContentFrom("Create", "RolesPermissions", Model.Role) .Modal(true) .Width(550) .Height(300) .Draggable() .Visible(false) )
@model IEnumerable<TrackGridModel><div> @(Html.Kendo().Grid(Model).Name("TrackGrid") .Columns(columns => { columns.Bound(t => t.rowIndex).Visible(false); columns.Bound(t => t.trackNumber).Title("Tracking Number").Template(@<text><a href="#" onclick="getTrackDetail(@item.rowIndex)">@item.trackNumber</a></text>); columns.Bound(t => t.shipDate).Title("Ship Date"); columns.Bound(t => t.originalABFlag).Title("Original/Accessorial"); columns.Bound(t => t.refNotes).Title("Reference"); columns.Bound(t => t.billToAccount).Title("Bill To Account"); columns.Bound(t => t.shipperName).Title("Shipper Name"); columns.Bound(t => t.shipperAddress).Title("Shipper Address"); columns.Bound(t => t.recipientName).Title("Recipient Name"); columns.Bound(t => t.recipientAddress).Title("Recipient Address"); columns.Bound(t => t.PODDate).Title("POD Date"); columns.Bound(t => t.service).Title("Service"); columns.Bound(t => t.packaging).Title("Packaging"); columns.Bound(t => t.billedWeight).Title("Billed Weight"); columns.Bound(t => t.actualWeight).Title("Actual Weight"); }).Pageable()) </div><div style="position:relative">@(Html.Kendo().Window().Name("TrackDetailWindow").Title("Tracking Detail").HtmlAttributes(new { style = "font-size:1.5em;" }) .Width(1000).Height(700).Visible(false))</div><script type="text/javascript"> getTrackDetail = function (n) { var kendoWindow = $("#TrackDetailWindow").data("kendoWindow"); kendoWindow.refresh({ url: "/Home/GetTrackDetail/", data: { ndx: n} }); kendoWindow.center(); kendoWindow.open(); }</script>using System.Collections.Generic;public class TrackGridModel{ public string trackNumber {get; set;} public string shipDate {get; set;} public string refNotes {get; set;} public string billToAccount {get; set;} public string shipperName {get; set;} public string shipperAddress {get; set;} public string recipientName { get; set; } public string recipientAddress { get; set; } public string PODDate {get; set;} public string packaging {get; set;} public string service {get; set;} public string billedWeight {get; set;} public string actualWeight {get; set;} public int rowIndex {get; set;} public char originalABFlag {get; set;}}public ActionResult TrackItByAccount(string acctNumbers, DateTime begindate, DateTime enddate ) { string[] strSplitArr = acctNumbers.Split(new string[] {"\n", "\r\n"}, StringSplitOptions.None); List<string> acctNums = strSplitArr.ToList<string>(); ShipmentRetrieval shipmentRetrieval = new ShipmentRetrieval(); ShipmentInformation shipinfo = new ShipmentInformation(); List<ShipmentInformation> trackInfoList = new List<ShipmentInformation>(); TrackGridModel tgm = new TrackGridModel(); List<TrackGridModel> trackGridList = new List<TrackGridModel>(); ShipmentInformationList shipInfoList = new ShipmentInformationList(); List<ShipmentInformationList> shipInfoListAll = new List<ShipmentInformationList>(); foreach (string acct in acctNums) { shipInfoList = shipmentRetrieval.getVendorDetailListByAccountAndDate(acct, begindate, enddate); shipInfoListAll.Add(shipInfoList); shipInfoList = new ShipmentInformationList(); } string custRef = ""; foreach (ShipmentInformationList sil in shipInfoListAll) { for (int i = 0; i < sil.ShipmentList.Count; i++) { shipinfo = sil.ShipmentList[i]; foreach (KeyValuePair<string, string> reference in shipinfo.CustomerReference) { custRef = (custRef == "" ? "" : custRef + ", ") + reference.Value; } tgm.rowIndex = i; tgm.actualWeight = shipinfo.PackageInfo.ActualWeight.Weight.ToString() + " " + shipinfo.PackageInfo.ActualWeight.WeightUnit; tgm.billedWeight = shipinfo.PackageInfo.BilledWeight.Weight.ToString() + " " + shipinfo.PackageInfo.BilledWeight.WeightUnit; tgm.packaging = shipinfo.PackageInfo.PackageDescription; tgm.PODDate = shipinfo.PODInfo.PODDate; tgm.billToAccount = shipinfo.BillingInfo.BillToAccount; tgm.recipientAddress = shipinfo.RecipientInformation.Address.City + ", " + shipinfo.RecipientInformation.Address.StateProvince + " " + shipinfo.RecipientInformation.Address.PostalCode; tgm.recipientName = shipinfo.RecipientInformation.Name; tgm.refNotes = custRef; tgm.service = shipinfo.PackageInfo.Service; tgm.shipDate = shipinfo.ShipDate; tgm.shipperAddress = shipinfo.ShipperInformation.Address.City + ", " + shipinfo.ShipperInformation.Address.StateProvince + " " + shipinfo.ShipperInformation.Address.PostalCode; tgm.shipperName = shipinfo.ShipperInformation.Name; tgm.trackNumber = shipinfo.TrackingNumber; tgm.originalABFlag = shipinfo.OriginalABFlag; trackGridList.Add(tgm); shipinfo = new ShipmentInformation(); tgm = new TrackGridModel(); custRef = ""; } } return PartialView("TrackGrid", trackGridList);}@(Html.Kendo().Grid(Model) _ .Name("MaintenanceTickets") _ .Columns(Function(modelItem) modelItem.Bound(Function(p) p.CreateDate).Format("{0:d}").Title("Created")) _ .Columns(Function(modelItem) modelItem.Bound(Function(p) p.Originator).Width(100)) _ .Columns(Function(modelItem) modelItem.Bound(Function(p) p.CustomerName).Title("Customer").Width(100)) _ .Columns(Function(modelItem) modelItem.Bound(Function(p) p.Description)) _ .Columns(Function(modelItem) modelItem.Bound(Function(p) p.OntimeAssignedTo).Title("Assigned").Width(100)) _ .Columns(Function(modelItem) modelItem.Bound(Function(p) p.Description)) _ .Columns(Function(modelItem) modelItem.Bound(Function(p) p.Priority.Name).Title("Priority").Width(75)) _ .Columns(Function(modelItem) modelItem.Bound(Function(p) p.Status.Name).Title("Status").Width(75)) _ .Columns(Function(modelitem) modelitem.Bound("Id").Title("Actions").Template(Sub(item)@<text> <a href="@url.Action("Details", "Ticket")/@item.Id">Details</a> <a href="/Ticket/Edit/@item.Id">Edit</a> </text> End Sub)) _ .Pageable(Function(page) page.PageSizes(5)) _ .Sortable() _ .Filterable() _ .Resizable(Function(resize) resize.Columns(True)) _ .ColumnMenu() )@(Html.Kendo().Grid<BuyItNow.Models.LineItemViewModel>().HtmlAttributes(htmlAttributes) .Name("kendoGrid") .EnableCustomBinding(true) .BindTo(Model.Data) .Events(events => events.DataBound("dataBound")) .Columns(columns => { columns.Bound(p => p.lineNumber); columns.Bound(p => p.partNum).Title("Part#").EditorTemplateName("PartNumber"); columns.Bound(p => p.partDescription).EditorTemplateName("Description"); columns.Bound(p => p.unitOM).EditorTemplateName("UOM").Equals("EA"); columns.Bound(p => p.partQuant).EditorTemplateName("Number").Format("{0:n0}"); }) .ToolBar(toolbar => { toolbar.Create(); toolbar.Save(); }) .Editable(editable => editable.Mode(GridEditMode.InCell)) .Pageable() .Sortable() // .Scrollable() .Navigatable() .DataSource(dataSource => dataSource .Ajax() .Total(Model.Total) .Batch(true) .ServerOperation(false) .Events(events => events.Error("error_handler")) .Model(model => { model.Id(p => p.itemID); model.Field(p => p.lineNumber).Editable(false).DefaultValue("0000"); }) .Create(update => update.Action("_Create", "LineItems")) .Read(read => read.Action("_Read", "LineItems")) .Update(update => update.Action("_Update", "LineItems")) ).Resizable(resize => resize.Columns(true))$(document).ready(function() { var grid = $("#kendoGrid").data("kendogrid"); // bind to the edit event grid.bind("edit", function (e) { debugger; e.preventDefault(); e.container.find('input:last').focus() } });