or
@model Company.Domain.MVC.Models.ShipmentModel
@using Kendo.Mvc.UI
@{
Layout = "~/Views/Shared/_StandardLayout.cshtml";
ViewBag.Title = "Home";
}
<
script
type
=
"text/javascript"
>
function QuoteItemGrid_ErrorHandler(e) {
if (e.errors) {
var message = "Errors:\n";
$.each(e.errors, function (key, value) {
if ('errors' in value) {
$.each(value.errors, function () {
message += this + "\n";
});
}
});
alert(message);
}
}
</
script
>
<
div
id
=
"ShipmentForm"
>
@(Html.Kendo().PanelBar()
.Name("panelBar")
.ExpandMode(PanelBarExpandMode.Single)
.HtmlAttributes(new { style = "width:100%" })
.Items(panelBar =>
{
panelBar.Add().Text("Shipment Items")
.Expanded(true)
.Content(@<
div
>
@(Html.Kendo().Grid<
Company.Domain.MVC.Models.ItemModel
>()
.Name("QuoteItemGrid")
.Columns(columns =>
{
columns.Bound(i => i.FreightClass).Width(50);
columns.Bound(i => i.Length).Width(50);
columns.Bound(i => i.Width).Width(50);
columns.Bound(i => i.Height).Width(50);
columns.Bound(i => i.DimensionUnitOfMeasure).Width(50);
columns.Bound(i => i.QuantityValue).Width(50);
columns.Bound(i => i.QuantityUnitOfMeasure).Width(50);
columns.Bound(i => i.Weight).Width(50);
columns.Bound(i => i.WeightUnitOfMeasure).Width(50);
columns.Bound(i => i.NmfcCode).Width(50);
columns.Bound(i => i.ItemDescription).Width(50);
})
.ToolBar(toolbar =>
{
toolbar.Create();
toolbar.Save();
})
.Editable(editable => editable.Mode(GridEditMode.InCell))
.Pageable()
.Sortable()
.Scrollable()
.DataSource(dataSource => dataSource
.Ajax()
.Batch(true)
.ServerOperation(false)
.Events(events => events.Error("QuoteItemGrid_ErrorHandler"))
.Model(model => model.Id(i => i.ItemID))
.Create(create => create.Action("CreateProducts", "Home"))
.Read(read => read.Action("GetProducts", "Home"))
.Update(update => update.Action("UpdateProducts", "Home"))
.Destroy(destroy => destroy.Action("DeleteProducts", "Home"))
)
)
</
div
>);
panelBar.Add().Text("Services")
.Content(@<
div
>Services here</
div
>);
panelBar.Add().Text("Address Information")
.Content(@<
div
style
=
"margin-left:1%;"
>
HTML omitted for brevity
</
div
>);
panelBar.Add().Text("Miscellaneous")
.Content(@<
div
>
HTML omitted for brevity
</
div
>);
})
)
</
div
>
<
td
><
a
class
=
"k-link"
href
=
"#"
data-value
=
"2012/7/14"
title
=
"Tuesday, August 14, 2012"
>14</
a
></
td
>
<
td
class
=
""
><
a
class
=
"k-link"
href
=
"#"
data-value
=
"2012/6/10"
title
=
"Tuesday, July 10, 2012"
>
<
div
title
=
""
class
=
"selectedDate"
>10</
div
>
</
a
></
td
>