Hi i have use the following code snippet in js render template.
{{if Expanded}}e-gridtreerowexpand {{else (!Expanded)&&(HasChildGridRecords)}} e-gridtreerowcollapse {{/if}}
In this else condition did not work. Where Expanded, HasChildGridRecords are the properties present in the data object to be rendered.
How to resolve this propblem.
That should work. (Though it is redundant to put
(!Expanded)
since you already tested that in the if).You can write
(No need for the parens either)
If Expanded is true you get the first block rendered.
If HasChildGridRecords truey, and Expanded is falsey, you get the second block.