or
<
div
data-role
=
"footer"
>
<
div
data-role
=
"tabstrip"
>
<
a
href
=
"#Home"
data-icon
=
"home"
>Home</
a
>
<
a
href
=
"External.html"
data-icon
=
"info"
>Details</
a
>
</
div
>
</
div
>
<!DOCTYPE html>
<
html
>
<
head
>
<
title
>External</
title
>
</
head
>
<
body
>
<
div
id
=
"External"
data-role
=
"view"
data-title
=
"External"
data-layout
=
"mobile-tabstrip"
>
</
div
>
</
body
>
</
html
>
@(Html.Kendo().Grid<
OnlineAB.Models.GoodsServiceModel
>()
.Name("GSSrcGrid")
.Columns(columns =>
{
columns.Bound(gs => gs.ID).Visible(false);
columns.Bound(gs => gs.GSPrice).Groupable(false).Width(100);
columns.Bound(gs => gs.GSTime).Width(100);
columns.Bound(gs => gs.GSDescription).Width(200);
columns.Bound(gs => gs.GSTitle).Width(150);
columns.Bound(gs => gs.GSCode).Width(120);
})
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("GetGoodsandService", "GS")
.Data("GetParam"))
.ServerOperation(false)
)
.Sortable()
.Scrollable()
.Filterable()
.RowAction(row => row.HtmlAttributes.Add("data-id", row.DataItem.ID))
.Selectable(s => s.Mode(GridSelectionMode.Single))
.Events(events => events.Change("GSSelectionChange"))
)
function GSSelectionChange() {
var gsgrid = $('#GSSrcGrid').data('kendoGrid');
var goods = gsgrid.select();
var goodsID = goods.data("id");
alert(goodsID);
}
<script type=
"text/javascript"
>
$(document).ready(
function
() {
var
validator = $(
"#tickets"
).kendoValidator({
rules: {
upload:
function
(input) {
if
(input[0].type ==
"file"
) {
return
input.closest(
".k-upload"
).find(
".k-file"
).length;
}
return
true
;
}
}
}).data(
"kendoValidator"
);
$(
"button"
).click(
function
(e) {
if
(!validator.validate()) {
e.preventDefault();
}
});
});
$(
"#fuActivitySheet"
).kendoUpload({
multiple:
false
});
</script>
<
div
id
=
"tickets"
>
@using (Html.BeginForm("UploadNewActivitySheet", "Vendor", FormMethod.Post, new { id = "UploadActivitySheet", enctype = "multipart/form-data", @class = "clearfix padding_t25" }))
{
@Html.TextBoxFor(model => model.UploadedFile, new { id = "fuActivitySheet", name="fuActivitySheet" , type = "file" })
@Html.ValidationMessageFor(m => m.UploadedFile)
<
button
class
=
"k-button"
type
=
"submit"
>Submit</
button
>
}
</
section
>
</
div
>
[Display(Name =
"Activity Sheet: "
)]
[Required(ErrorMessage =
"Please Select Activity sheet to upload"
)]
public
System.Web.HttpPostedFileBase UploadedFile {
get
;
set
; }
Thanks,
J
$(document).ready(
function
() {
var
validator = $(
"#tickets"
).kendoValidator({
rules: {
upload:
function
(input) {
if
(input[0].type ==
"file"
) {
return
input.closest(
".k-upload"
).find(
".k-file"
).length;
}
return
true
;
}
}
}).data(
"kendoValidator"
);
$(
"button"
).click(
function
(e) {
if
(!validator.validate()) {
e.preventDefault();
}
});
});
$(
"#fuActivitySheet"
).kendoUpload({
multiple:
false
});
<
div
id
=
"tickets"
>
@using (Html.BeginForm("UploadNewSheet", "Vendor", FormMethod.Post, new { id = "UploadSheet", enctype = "multipart/form-data" }))
{
@Html.TextBoxFor(model => model.UploadedFile, new { id = "fuActivitySheet", name="fuActivitySheet" , type = "file" })
<
br
/>
<
button
class
=
"k-button"
type
=
"submit"
>Submit</
button
>
}
</
div
>
[Display(Name =
"Sheet: "
)]
[Required(ErrorMessage =
"Please Select sheet to upload"
)]
public
System.Web.HttpPostedFileBase UploadedFile {
get
;
set
; }
@using (this.Html.BeginForm(new { this.ViewBag.ReturnUrl }))
{
@Html.AntiForgeryToken()
<
div
class
=
"l-editor-label"
>
@this.Html.LabelFor(m => m.UserName)
</
div
>
<
div
class
=
"l-editor-field"
>
@this.Html.TextBoxFor(m => m.UserName, new { @class = "k-textbox" })
@this.Html.ValidationMessageFor(m => m.UserName)
</
div
>
<
div
class
=
"l-editor-label"
>
@this.Html.LabelFor(m => m.Password)
</
div
>
<
div
class
=
"l-editor-field"
>
@this.Html.PasswordFor(m => m.Password, new { @class = "k-textbox" })
@this.Html.ValidationMessageFor(m => m.Password)
</
div
>
<
div
class
=
"l-editor-label"
>
@this.Html.CheckBoxFor(m => m.RememberMe, new { @class = "k-checkbox" })
@this.Html.LabelFor(m => m.RememberMe)
</
div
>
<
p
class
=
"button"
>
<
button
class
=
"k-button"
> Log in</
button
>
</
p
>
<
p
>@this.Html.ValidationSummary(true, "Login was unsuccessful. Please correct the errors and try again.")</
p
>
}
<
script
src
=
"@this.Url.Content("
~/Scripts/jquery.unobtrusive-ajax.min.js")"
type
=
"text/javascript"
> </
script
>
<
script
src
=
"@this.Url.Content("
~/Scripts/jquery.validate.min.js")"
type
=
"text/javascript"
> </
script
>
<
script
src
=
"@this.Url.Content("
~/Scripts/jquery.validate.unobtrusive.min.js")"
type
=
"text/javascript"
> </
script
>
$("form").kendoValidator();