user3045654
user3045654

Reputation: 1734

Multiselect template with condition?

Hello i am use kendo UI and in multiselect have some problems with templte, this my current template

k-item-template= '"#: codeNameId # - #: (+sumVat) # dol. nal; #: sumNameId # dol. without nal"'

but i am want template with condition where if (codeNameId === 999) { '"#: codeNameId # - #: (+sumVat) # dol. nal; #: sumNameId # dol. without nal"'} else {'"nal; #: sumNameId # nal"'}

Upvotes: 0

Views: 275

Answers (1)

Adrian
Adrian

Reputation: 8597

Your template is wrong. You're missing additional opening hash symbols on the outer and inner if statement.

Please see below for working example.

#if (codeNameId === 999) {# #: codeNameId # - #: (+sumVat) # dol. nal #: sumNameId # dol. without nal #} else {# nal; #: sumNameId # nal #}#

Upvotes: 2

Related Questions