or
<
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'
}
}
}
}
});
$J($chartD).kendoStockChart({
dataSource: wData,
series: [{
type:
"candlestick"
,
openField:
"open"
,
closeField:
"close"
,
highField:
"high"
,
lowField:
"low"
,
categoryField:
"cat"
,
colorField:
"color"
,
notes:{
line: {
width: 0,
length: 0
},
label: {
font:
"bold 9px Open Sans, sans-serif"
},
icon: {
border: {
width: 0
}
}
},
tooltip:{
format:
"{4}:<br /> {0:n0} -> {3:n0}"
}
}],
navigator:{
visible:
false
},
categoryAxis:{
categories: cats,
type:
"category"
,
labels: {
font:
"bold 9px Open Sans, sans-serif"
,
rotation: 90,
step: 1,
skip: 0
}
},
valueAxis: {
labels: {
format:
"N0"
}
}
});
[Object, Object, Object, Object, Object, Object, Object, Object]
0: Object
cat:
"2009"
close: 6831
color:
"#75B5CD"
high: 6831
low: 0
noteText: 6831
open: 0
__proto__: Object
1: Object
cat:
"Direct Hire"
close: 9185
color:
"#4E503F"
high: 9185
low: 6831
noteText: 2354
open: 6831