I have the following template defined
<
script
type
=
"text/x-kendo-tmpl"
id
=
"tmplterminalSummary"
>
<
div
class
=
"row grandTotalRow"
><
br
>
<
span
class
=
"col-md-1 col-xs-3 resultLabel text-left"
>Gift Cards Terminal</
span
>
<
br
>
<
span
class
=
"col-md-2 col-xs-2 resultValue"
>#:kendo.toString(gcardGross,"c")#</
span
><
br
>
<
span
class
=
"col-md-3 col-xs-2 resultValue"
>#:kendo.toString(gcardRefund,"c")#</
span
><
br
>
<
span
class
=
"col-md-3 col-xs-2 resultValue"
>N/A</
span
><
br
>
<
span
class
=
"col-md-3 col-xs-2 resultValue"
>#:kendo.toString(netGCard,"c")#</
span
><
br
>
</
div
>
</
script
>
The issue I am having is that sometimes gcardGross is undefined. This results in a run time error like this https://screencast.com/t/6lHLtsliMx5F
I have tried replacing it with a line like this but unfortunately the error continues to occur.
<span class="col-md-2 col-xs-2 resultValue">#:gcardGross?kendo.toString(gcardGross,"c"):kendo.toString(0,"c")#</span><br>
So how can I define a default value so that 0 is shown if the property is undefined.