Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
465
Multiples {{if}} blocks in the same template
posted

Hello,

I use a template column to customize the display. However, I need to define multiple conditional blocks.

This works:
template: '{{if ${CanEdit} == true}}OK{{else}}KO{{/if}}'

But this does not work (exception in templating):
template: '{{if ${CanEdit} == true}}OK{{else}}KO{{/if}}   -  {{if ${CanDelete} == true}}OK{{else}}KO{{/if}} '

How can I do? I have set up 5 conditions.

Thanks in advance,
Olivier Hélin

Parents
  • 5105
    Offline posted

    Hi Oliver,

    As described in documentation the template parser uses greedy regular expressions allowing the use of nested if-statements but making sequential if statements unsupported. Could you provide us with an isolated sample of your use case so we can suggest a different approach for you?

    Thank you for using the Infragistics forums!

Reply Children