or
grid = new kendo.ui.Grid(
gridContainer,
{
columns: columns,
dataSource: dataSource,
selectable: "multiple, row",
pageable: true,
scrollable: true,
filterable: true,
sortable: true,
change: function () {
// some code regarding selection column
},
dataBound: function() {
// some code regarding selection column
}
}
);
<
div
data-role
=
"view"
style
=
"background: green;"
id
=
"tabstrip-card"
data-init
=
"cardViewInit"
data-title
=
"My card"
data-layout
=
"mobile-tabstrip"
>
content goes here
</
div
>
<
div
data-role
=
"view"
data-title
=
"Form Unexpected but nice"
data-init
=
"ns.viewA.init"
data-before-show
=
"ns.viewA.beforeShow"
data-show
=
"ns.viewA.show"
data-model
=
"ns.viewA.viewModel"
>
...
<
select
data-bind
=
"source:options,value:underlying.optionId"
data-text-field
=
"display"
data-value-field
=
"id"
></
select
>
...
</
div
>
01.
(
function
($, kendo, ns){
02.
var
model = {
03.
options: [],
04.
underlying:
null
05.
};
06.
07.
model.bind(
'change'
,
function
(e) {
08.
var
t;
09.
console.info(
'field %s changed.'
, e.field);
10.
if
(e.field ===
'underlying.optionId'
) {
11.
t = viewModel.options.singleOrDefault(
'id'
, model.underlying.optionId);
12.
viewModel.set(
'model.underlying.derivedValue'
, t.someValue);
13.
}
14.
});
15.
16.
ns.viewA = {
17.
init:
function
(){
18.
// populate options
19.
...
20.
},
21.
beforeShow:
function
(){
22.
},
23.
show:
function
(){
24.
model.set(
'underlying'
, {
25.
optionId:
null
,
26.
derivedValue:
'Not Set'
27.
});
28.
},
29.
viewModel: model
30.
};
31.
}(jQuery, kendo, myApp));
1.
<
ul
data-role
=
'listview'
><
li
>static option/information</
li
></
ul
>