or
<
div
id
=
"dlgUpload"
style
=
"display:none"
>
<
p
><
span
class
=
"ui-icon ui-icon-info"
style
=
"float: left; margin: 0 7px 20px 0;"
></
span
>Photo Upload</
p
>
<
div
style
=
"width:100%;max-height:300px;"
>
@(Html.Kendo().Upload()
.Name("fileUpload")
.Async(a => a
.Save("Save", "Upload")
.Remove("Remove", "Upload")
.AutoUpload(true)
)
.Events(e => e
.Upload(@<
text
>
function(e) {
e.data = { jobNumber: $("#Customer_Number").val(), mode:"photos" };
}
</
text
>)
.Remove(@<
text
>
function(e) {
e.data = { jobNumber: $("#Customer_Number").val(), mode:"photos" };
}
</
text
>)
)
)
</
div
>
</
div
>
function uploadPhotos(customerId) {
$(
"#dlgUpload"
).dialog({
autoOpen: false,
resizable: false,
draggable: true,
modal: true,
width
:
470
,
title:
"Upload Photos for Customer "
+ customerId,
buttons: {
"Close"
: function () {
$(this).dialog(
"close"
);
}
},
});
$(
'#dlgUpload'
).dialog(
'open'
);
}
.ui-dialog .k-upload-button input
{
z-index
:
auto
!important
;
}
Events(e => e.Edit("getKey()"))
.ToolBar(commands =>
{
commands.Create().HtmlAttributes(new { onclick = "getKey()" });
})
<
script
type
=
"text/javascript"
>
kendo.culture(//here is my culture);
</
script
>
.ToolBar(toolbar =>
{
toolbar.Template(
@{
if(centre.AttributeCenterRels.Count < 6) {
@<div class="action text-align-right">
<a href="~/AttributCentreRel/Create?CentreId=@centre.Id" class="btn"><i class="icon-plus"></i> Create</a>
</div>
}
else{
@<div class="action text-align-right">
Vous ne pouvez spécifier que 6 attributs pour un centre.
</div>
}
}
);
})
Is this possible?
Regards,