or
@(Html.Kendo().DropDownListFor(m => m.InputModel.CampusCode).OptionLabel("--- select ---").BindTo(Model.Campuses))
@(Html.Kendo().DropDownListFor(m => m.InputModel.RepUserCode)
.DataTextField("FullName")
.DataValueField("ClientUserCode")
.DataSource(source =>
{
source.Read(read => read.Url("/GetCampusUsers);
source.ServerFiltering(true);
})
.OptionLabel("-- select --")
.AutoBind(false)
.CascadeFrom("InputModel_CampusCode")
)
public
class
Model
{
public
Model() {
this
.CreateDate = DateTime.UtcNow;
}
// Other properties
public
DateTime CreateDate {
get
;
private
set
; }
}
// Other setup...
.DataSource(ds =>
ds.Ajax()
.Model(model =>
{
model.Id(o => o.Id);
model.Field(m => m.CreateDate).Editable(false);
})
// more...
@(Html.Kendo().Grid<Grant>()
.Name(
"gd-gt"
)
.BindTo(Model.Grants)
.Columns(c =>
{
c.Bound(g => g.GrantDate).Width(90).Format(
"{0:MM/dd/yyyy}"
).HtmlAttributes(
new
{ style =
"text-align:center;"
});
c.Bound(g => g.ResultText).Title(
"Special Result"
).Sortable(
false
);
c.Bound(g => g.Amount).Format(
"{0:C2}"
).Width(80).HtmlAttributes(
new
{ style =
"text-align:right;"
})
.ClientFooterTemplate(
"#=kendo.toString(sum, 'C2')#"
).FooterHtmlAttributes(
new
{ style =
"text-align:right;"
});
})
.Pageable()
.Sortable(s => s.AllowUnsort(
false
))
.DataSource(ds => ds
.Ajax()
.ServerOperation(
true
)
.PageSize(5)
.Aggregates(aggregates =>
{
aggregates.Add(g => g.Amount).Sum();
})
.Model(model =>
{
model.Id(m => m.GrantId);
})
.Read(read => read.Action(
"LoadGrants"
,
"Home"
,
new
{ caseId = caseId }))
.Sort(s => { s.Add(g => g.GrantDate).Descending(); })
))
)
var
app =
new
kendo.mobile.Application();
@model MiniSIGEMobile.Models.Student
@using (Html.BeginForm()) {
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
<
ul
data-role
=
"listview"
data-inset
=
"true"
>
<
li
data-role
=
"fieldcontain"
>
@Html.LabelFor(model => model.Person.FirstName)
@Html.EditorFor(model => model.Person.FirstName)
@Html.ValidationMessageFor(model => model.Person.FirstName)
</
li
>
<
li
data-role
=
"fieldcontain"
>
@Html.LabelFor(model => model.Person.Age)
@Html.EditorFor(model => model.Person.Age)
@Html.ValidationMessageFor(model => model.Person.Age)
</
li
>
<
li
data-role
=
"fieldcontain"
>
@Html.LabelFor(model => model.Course)
@Html.EditorFor(model => model.Course)
@Html.ValidationMessageFor(model => model.Course)
</
li
>
<
li
data-role
=
"fieldcontain"
>
<
input
type
=
"submit"
value
=
"Create"
/>
</
li
>
</
ul
>
}
// POST: /Student/Create
[HttpPost]
[ValidateAntiForgeryToken]
public
ActionResult Create(Student student)
{
if
(ModelState.IsValid)
{
db.Students.Add(student);
db.SaveChanges();
return
RedirectToAction(
"Index"
);
}
return
View(student);
}
@using (Html.BeginForm("Send", "MultiSelect", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
<
div
class
=
"demo-section"
>
<
h3
class
=
"title"
>Select Continents</
h3
>
@(Html.Kendo().MultiSelect()
.Name("multiselect")
.DataTextField("Text")
.DataValueField("Value")
.BindTo(continents)
.Events(e =>
{
e.Change("change").Select("select").Open("open").Close("close").DataBound("dataBound");
})
)
</
div
>
<
input
id
=
"sendButton"
type
=
"submit"
value
=
" Send "
/>
}
public partial class MultiSelectController : Controller
{
public ActionResult Events()
{
return View();
}
public ActionResult Send(string multiselect)
{
//the string parameter multiselect has only one value even if more than one //value is selected
return View();
}
}