i have a error in window .
my solution:
Person:
and PersonDetail:
and PersonView.js:
after click edit button in grid, i see this error:
if remove this
in persiondetail is working!
please help me.
my solution:
Person:
@{
ViewBag.Title = "Index";
}
<
script
src
=
"@Url.Content("
~/scripts/models/personModel.js")"
type
=
"text/javascript"
></
script
>
<
script
src
=
"@Url.Content("
~/scripts/stores/personStore.js")"
type
=
"text/javascript"
></
script
>
<
script
src
=
"@Url.Content("
~/scripts/views/personView.js")"
type
=
"text/javascript"
></
script
>
<
script
id
=
"PersonDetail"
type
=
"text/x-kendo-template"
>
@Html.Partial("PersonDetail")
</
script
>
<
div
class
=
"k-rtl"
>
<
div
id
=
"PersonGrid"
></
div
>
</
div
>
and PersonDetail:
@*
@(Html.Kendo().TimePicker()
.Name("timepicker")
.Value("10:00 AM")
)
*@
and PersonView.js:
$(
function
() {
$(
"#PersonGrid"
).kendoGrid({
dataSource: personStore,
height:
"600px"
,
sortable: {
mode:
"multiple"
,
allowUnsort:
true
},
pageable:
true
,
//groupable: true,
scrollable:
true
,
selectable:
"row"
,
filterable:
true
,
columns: [
{ command: [{ name:
"edit"
, text:
"edit"
}, { name:
"destroy"
, text:
"del"
}], title:
""
, width: 150 },
{ field:
"FName"
, title:
"First Name"
, width: 50 },
{ field:
"LName"
, title:
"Last Name"
, width: 100 }
],
editable: { mode:
"popup"
,confirmation:
"Are you sure?"
, template: kendo.template($(
"#PersonDetail"
).html()) },
edit:
function
(e) {
var
title = $(e.container).parent().find(
".k-window-title"
);
var
update = $(e.container).parent().find(
".k-grid-update"
);
var
cancel = $(e.container).parent().find(
".k-grid-cancel"
);
$(title).html(
'<div>Edit</div>'
);
$(update).html(
'<span class="k-icon k-update"></span>Save'
);
$(cancel).html(
'<span class="k-icon k-cancel"></span>Cancel'
);
},
toolbar: [{ name:
"create"
, text:
"Add"
}]
});
});
after click edit button in grid, i see this error:
Microsoft JScript runtime error: Invalid template:
'
if remove this
@(Html.Kendo().TimePicker()
.Name(
"timepicker"
)
.Value(
"10:00 AM"
)
)
in persiondetail is working!
please help me.