I'm using a row template defined as:
<
script
type
=
"text/x-kendo-template"
id
=
"rowTemp"
>
<
tr
id
=
"tr_#= id #"
>
<
td
>#= id #</
td
>
<
td
>#= simbol #</
td
>
<
td
><
input
type
=
"checkbox"
name
=
"add_#= id #"
value
=
"#= id #"
id
=
"add_#= id #"
class
=
"add"
/></
td
>
<
td
align
=
"center"
><
input
type
=
"button"
class
=
"info k-button k-button-icontext"
name
=
"info"
value
=
"Info"
id
=
"info_#= id #"
style
=
"height: 26px; margin: 0px 2px; min-width: 64px;"
/></
td
>
</
tr
>
</
script
>
This button when clicked should open a new window.
$(
" .info "
).click(
function
(e) {
var
infowindow = $(
"#info_win"
)
.kendoWindow({
title:
"Info"
,
modal:
false
,
visible:
false
,
resizable:
true
,
width: 300,
content:
"someContent"
}).data(
"kendoWindow"
);
infowindow.center.open();
});
In this post states that template should be defined also in the column definition. So my grid looks something like that:
$(
"#grid"
).kendoGrid({
dataSource: {
data: data,
schema: {
model: {
fields:{
id: { type:
"number"
},
simbol: { },
add:{}
info:{},
}
}
}
columns: [{
field:
"add"
,
template:
'><input type="checkbox" name="add_#= id #" value="#= id #" id="add_#= id #" class="add" />'
,
title:
"Add"
,
},
{
field:
"info"
,
template:
'<input type="button" class="info k-button k-button-icontext" name="info" value="Info" id="info_#= id #" style="height: 26px; margin: 0px 2px; min-width: 64px;" />'
,
title:
""
,
}],
rowTemplate: kendo.template($(
"#rowTemp"
).html()),
});
But buttons are still not working.
Am I missing something? Please help.