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
Thanks for the quick reply. I just wanted to know what the possibilities are.
I will try to provide you with a solution quickly.
Yes, I have to use this JSON data source (provided by a controller MVC).
Hi again,
Are you bound to using this JSON or can it be changed?
Thanks a lot for the patience.
Thank you for your answer, my goal is to display a grid which contains a column called "Actions". In this column, the icons should be displayed according to the user rights.
Using nested conditionals, it is too much possibility (32 if/else for 5 icons grayed out or not)
Please find a simplified example of the problem in "iggrid_column_template.zip" file.
Olivier
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!