or
var value = $("#begin").data("kendoTimePicker").value();
var end = $("#end").data("kendoTimePicker");
if(value.getHours().toString() == "18" && value.getMinutes().toString() == "30")
{
var minimo = new Date(value.getTime() + 30*60000);
end.value(minimo);
end.enable(false);
}
else
{
var minimo = new Date(value.getTime() + 30*60000);
end.min(minimo);
end.enable(true);
}
public
class
DepositDepartment
{
public
int
Id {
get
;
set
; }
public
string
Name {
get
;
set
; }
public
int
? DepositDivisionId {
get
;
set
; }
public
string DepositDivisionName {
get
;
set
; }
/* other fields omitted */
}
public
class
DepositDivision
{
public
int
Id {
get
;
set
; }
public
string
Name {
get
;
set
; }
/* other fields omitted */
}
change:
function
() {
var
value =
this
.widget.value();
var
idx, length;
var
field =
this
.options.dataValueField ||
this
.options.dataTextField;
if
(field) {
var
source,
isObservableObject =
this
._valueIsObservableObject;
if
(
this
.bindings.source) {
source =
this
.bindings.source.get();
}
if
(value ===
""
&& isObservableObject) {
value =
null
;
}
else
{
if
(!source || source
instanceof
kendo.data.DataSource) {
source =
this
.widget.dataSource.view();
}
for
(idx = 0, length = source.length; idx < length; idx++) {
if
(source[idx].get(field) == value) {
if
(isObservableObject) {
value = source[idx];
}
else
{
value = source[idx].get(field);
}
break
;
}
}
}
}
this
.bindings.value.set(value);
},
toolbar:[{
text: "Go to Add User Page",
className: "k-grid-custom",
imageClass: "k-add"
}],
function createUser(){
alert('Hello World');
}
@Imports Newtonsoft.Json
@code
' -- die Teams einlesen
Dim ccT = (From p2 In ctx.TeamSet Order By p2.TeamName Select p2.TeamName, p2.Id).ToList()
Dim ccTeams = JsonConvert.SerializeObject(ccT , Formatting.None)
End Code
<
input
id
=
"ecolor"
value
=
"1"
/>
<
script
>
$(document).ready(function () {
// create DropDownList from input HTML element
$("#ecolor").kendoDropDownList({
dataTextField: "TeamName",
dataValueField: "Id",
dataSource: '@ccTeams',
index: 0,
change: onChange2
});
var color2 = $("#ecolor").data("kendoDropDownList");
function onChange2() {
var value = $("#ecolor").val();
alert(value)
}
});
</
script
>
<%:
Html.Kendo().Grid<
Totalcom.XBase.Biz.Base.Models.Elements.Element
>()
.Name("Grid").Columns(columns =>
{
columns.Bound(p => p.IsActive).Title("Attivo");
columns.Bound(p => p.Name);
columns.Bound(p => p.Key);
})
.DataSource(dataSource => dataSource
.Ajax() // Specify that the data source is of ajax type
.Model( model =>
{
model.Id (x => x.Key);
model.Field(x => x.IsActive);
model.Field(x => x.Name);
model.Field(x => x.Key);
})
.Sort(sort => sort
.Add(x => x.Name))
.Read(read => read.Action("GetChildren", "Documents", new { Area = "CMS", Id = Model.Key, ApplicationKey = Html.GetSessionInfo().ApplicationKey}))
)
.Sortable()
.Pageable()%>
public ActionResult GetChildren([DataSourceRequest]DataSourceRequest request)
{
...
DataSourceResult result = children.ToDataSourceResult(request);
return Json(result, JsonRequestBehavior.AllowGet);
}