or
@(Html.Kendo().ListView<
AttachedFile
>()
.Name("attachedFilesListView")
.TagName("div")
.ClientTemplateId("attachedFilesTemplate")
.DataSource(dataSource => dataSource
.Model(model => {
model.Id(f => f.AttachedFileID);
model.Field(f => f.EntityTableKey).DefaultValue(Model.CorrectiveActionItemID);
})
.Read(read => read.Action("Files_Read", "CorrectiveActionItem", new { correctiveActionItemId = Model.CorrectiveActionItemID }))
.Destroy(destroy => destroy.Action("Files_Delete","CorrectiveActionItem"))
.PageSize(4)
)
.Pageable()
.Editable()
)
@model AttachedFile
@(Html.Kendo().Upload()
.Name("files")
.Async(a => a.Save("SaveFile", "CorrectiveActionItem", new { correctiveActionItemId = Model.EntityTableKey })
.AutoUpload(true))
)
@(Html.Kendo().ComboBoxFor(model => model.AffectedUser)
.Placeholder("Choose One...")
.DataTextField("Text")
.DataValueField("Value")
.Filter(FilterType.Contains)
.AutoBind(false)
.DataSource(dataSource => dataSource
.Read(read => read.Action("GetUserList", "User"))
.ServerFiltering(true)
))
public
class
UserController : Controller
{
public
JsonResult GetUserList(
string
group,
string
filter)
{
var items =
new
List<SelectListItem>();
for
(
int
i = 1; i <= 500; i++)
{
items.Add(
new
SelectListItem { Value = i.ToString(), Text =
"John"
});
}
items.Add(
new
SelectListItem { Value =
"Jane"
, Text =
"Jane"
});
return
Json(items.AsEnumerable(), JsonRequestBehavior.AllowGet);
}
}
@(Html.Kendo().MobileApplication()
.ServerNavigation(false)
.Transition("fade")
.HideAddressBar(true)
.Skin("flat")
)
@(Html.Kendo().MobileLayout()
.Name("drawer-layout")
.Header(obj =>
Html.Kendo().MobileNavBar()
.Content(navbar =>
@<
text
>
@(Html.Kendo().MobileButton()
.Align(MobileButtonAlign.Left)
.Icon("drawer-button")
.Rel(MobileButtonRel.Drawer)
.Url("#my-drawer")
)
@navbar.ViewTitle("")
@(Html.Kendo().MobileButton()
.Align(MobileButtonAlign.Right)
.Text("Back")
.HtmlAttributes(new { @class = "nav-button" })
.Url(Url.RouteUrl(new { controller = "home" }))
)
</
text
>)
)
)
@(Html.Kendo().ComboBoxFor(model => model.Impact)
.Placeholder("Choose One...")
.DataTextField("Text")
.DataValueField("Value")
.Suggest(true)
.DataSource(dataSource => dataSource
.Read(read => read.Action("GetImpactList", "Enum"))
))
@using Kendo.Mvc.UI
@model IEnumerable<
MyObject
>
<
legend
>Objects</
legend
>
@(Html.Kendo().Grid(Model)
.Name("object-grid")
.Columns(columns =>
{
columns.Bound(m => m.Description).Title("Product");
columns.Bound(m => m.Id);
columns.Bound(m => m.Quantity)
.HtmlAttributes(new { @class = "quantity" });
})
.Scrollable()
.Selectable()
.Editable(editable => editable.Mode(GridEditMode.InLine))
.DataSource(dataSource => dataSource
.Server()
.Model(model => model.Id(m => m.Id)))
)