or
Hi ,
I have a List View which I would like to show on the notification widget using a template.
The notification widget template does not seem to support MVVM binding.
Have attached a sample code showing
List View being displayed bound to a template using MVVM
Notification widget being shown binding a simple text
Notification widget being shown using the List Template ( This Fails)
Please see attached file for code
Regards
Balachander
<div kendo-notification=
"saveNotification"
>
</div>
$scope.saveNotification.show(
"Hello"
,
"World"
);
var
vm =
this
;
vm.saveNotification.show();
<
script
id
=
"reportTemplate"
type
=
"text/x-kendo-template"
>
<
div
style
=
"height:100px; width:300px;border:thin solid black;"
>
<
h3
><
img
src
=
"/Content/Images/SuccessfulSaveTickMark.png"
alt
=
""
/>#= title #</
h3
>
<
p
>
@Html.LabelFor(m => m.NotificationText)
</
p
>
<
p
>
@(Html.Kendo().Button()
.Name("viewNowButton")
.HtmlAttributes(new { type = "button", onclick = "javascript:validateSession()" })
.Content("View Now")
)
@(Html.Kendo().Button()
.Name("viewLaterButton")
.HtmlAttributes(new { type = "button", onclick = "javascript:validateSession()" })
.Content("View Later")
)
@(Html.Kendo().Button()
.Name("downloadButton")
.HtmlAttributes(new { type = "button", onclick = "javascript:validateSession()" })
.Content("Download")
)
</
p
>
<
p
>
@(Html.Kendo().Button()
.Name("redirectToReportPickupButton")
.HtmlAttributes(new { type = "button", onclick = "javascript:validateSession()" })
.Content("Go to Report Pick Up Page")
)
</
p
>
</
div
>
</
script
>
<
script
id
=
"reportTemplate"
type
=
"text/x-kendo-template"
>
<
div
style
=
"height:100px; width:300px;border:thin solid black;"
>
<
h3
><
img
src
=
"/Content/Images/SuccessfulSaveTickMark.png"
alt
=
""
/>#= title #</
h3
>
<
p
>
<
label
for
=
"NotificationText"
>NotificationText</
label
>
</
p
>
<
p
>
<
button
id
=
"viewNowButton"
onclick
=
"javascript:validateSession()"
type
=
"button"
>View Now</
button
><
script
>
jQuery(function(){jQuery("#viewNowButton").kendoButton({});});
</
script
>
<
button
id
=
"viewLaterButton"
onclick
=
"javascript:validateSession()"
type
=
"button"
>View Later</
button
><
script
>
jQuery(function(){jQuery("#viewLaterButton").kendoButton({});});
</
script
>
<
button
id
=
"downloadButton"
onclick
=
"javascript:validateSession()"
type
=
"button"
>Download</
button
><
script
>
jQuery(function(){jQuery("#downloadButton").kendoButton({});});
</
script
>
</
p
>
<
p
>
<
button
id
=
"redirectToReportPickupButton"
onclick
=
"javascript:validateSession()"
type
=
"button"
>Go to Report Pick Up Page</
button
><
script
>
jQuery(function(){jQuery("#redirectToReportPickupButton").kendoButton({});});
</
script
>
</
p
>
</
div
>
</
script
>
@(Html.Kendo().Notification().Name("popupNotification"))
<
link
href
=
"@Url.Content("
~/Content/bootstrap.css")"
rel
=
"stylesheet"
type
=
"text/css"
/><
br
><
link
href
=
"@Url.Content("
~/Content/kendo/2014.1.416/kendo.common.min.css")"
rel
=
"stylesheet"
type
=
"text/css"
/><
br
> <
link
href
=
"@Url.Content("
~/Content/kendo/2014.1.416/kendo.dataviz.min.css")"
rel
=
"stylesheet"
type
=
"text/css"
/><
br
> <
link
href
=
"@Url.Content("
~/Content/kendo/2014.1.416/kendo.default.min.css")"
rel
=
"stylesheet"
type
=
"text/css"
/><
br
> <
link
href
=
"@Url.Content("
~/Content/kendo/2014.1.416/kendo.dataviz.default.min.css")"
rel
=
"stylesheet"
type
=
"text/css"
/><
br
><
script
src
=
"@Url.Content("
~/Scripts/kendo/2014.1.416/jquery.min.js")"></
script
><
br
><
script
src
=
"@Url.Content("
~/Scripts/kendo/2014.1.416/kendo.all.min.js")"></
script
><
br
><
script
src
=
"@Url.Content("
~/Scripts/kendo/2014.1.416/kendo.aspnetmvc.min.js")"></
script
><
br
><
script
src
=
"@Url.Content("
~/scripts/kendo.modernizr.custom.js")"></
script
><
br
><
script
src
=
"@Url.Content("
~/Scripts/kendo.web.ext.js")"></
script
><
br
><
link
href
=
"@Url.Content("
~/Content/Site.css")"
rel
=
"stylesheet"
type
=
"text/css"
/>