or
.km-icon.km-drawer-button.km-notext
{
background: url("img/menu_button.png");
width: 19px;
height: 16px;
display: block;
}
<
div
class
=
"row"
>
<
div
class
=
"leftbox"
>
@Html.LabelFor(m => m.OrganisationId)
</
div
>
<
div
class
=
"rightbox"
>
@(Html.Kendo().ComboBoxFor(m => m.OrganisationId)
.BindTo(Model.OrganisationList)
.Placeholder("Select Organisation")
.Suggest(true)
.Filter(FilterType.Contains)
.HtmlAttributes(new { @class = "kendoDropdown wideDropdown", selectWidth = "400" }))
</
div
>
</
div
>
<
div
class
=
"row"
>
<
div
class
=
"leftbox"
>
@Html.LabelFor(m => m.UserId)
</
div
>
<
div
class
=
"rightbox"
>
@(Html.Kendo().ComboBoxFor(m => m.UserId)
.Placeholder("Select User")
.DataSource(source => source.Read(read => read.Action("GetUsers", "Auth").Data("getOrganisationId")).ServerFiltering(true))
.DataTextField("value")
.DataValueField("id")
.HtmlAttributes(new { @class = "kendoDropdown wideDropdown"})
.Enable(false)
.AutoBind(false)
.CascadeFrom("OrganisationId")
.Events(e => e.Change("enableButton") )
</
div
>
this
.elements.grid = $(
'#grid'
).kendoGrid({
dataSource: {
transport: {
read: {
url:
"/administrator/data/items"
,
dataType:
"json"
,
type:
'GET'
,
cache:
false
}
},
schema: {
total:
"total"
,
data:
"data"
},
page: 0,
pageSize: 15,
take: 15,
serverPaging:
true
,
serverFiltering:
true
,
type:
"aspnetmvc-ajax"
},
toolbar: kendo.template($(
"#search-byName"
).html()),
pageable: {
refresh:
true
,
pageSizes:
true
},
selectable:
"row"
,
columns: [
{
field:
"Id"
,
width: 25,
title:
"Identity"
},
{
field:
"Name"
,
width: 40,
title:
"Name"
,
template:
"<div class='#: Quality.CSS #'>#: Name #</div><div>#: (Origin.Label != null) ? Origin.Label : '' #</div>"
}
],
change:
function
(e) {
// get the selected row from the grid
var
selected =
this
.select();
// get the data from the selected row
var
data =
this
.dataItem(selected);
// update the model
viewModel.map(data.toJSON());
// perform binding as needed
viewModel.subscribe();
// set the mode to editing, since we have
// selected an existing item
viewModel.set(
"Editing"
,
true
);
},
}).data(
"kendoGrid"
);
var
dsAll =
new
kendo.data.DataSource({
serverFiltering:
true
,
transport: {
read: {
type:
'POST'
,
url:
'/pages/ajax/page.ashx'
,
dataType:
'json'
,
data: {
action:
'model'
,
modelname:
function
() {
return
$(
'#txtModelName'
).val()
}
},
cache:
false
}
},
schema: {
data:
function
(response) {
if
(response == undefined) {
$(
'#spanDateRange'
).hide();
$(
'#gridTrend'
).hide();
}
else
{
console.log(
'DataSource "dsAll" Bound'
);
$(
'#spanDateRange'
).show();
$(
'#gridTrend'
).show();
return
response;
}
},
model: {
fields: {
TrendModelId: { type:
'number'
},
EOM: { type:
'date'
},
Seg: { type:
'string'
},
LostPriceQty: { type:
'number'
},
LostPriceRev: { type:
'number'
},
LostAvailQty: { type:
'number'
},
LostAvailRev: { type:
'number'
}
}
}
}
});