We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Multiple template in switch case for row template in grid

It is not working.

<ejs-grid #grid [dataSource]='items.dataset' allowFiltering='true' [filterSettings]='filterSettings'>
                <ng-container *ngFor="let hitem of items.header">
                    <e-column *ngIf="hitem.Visibility != viewmode"  field='{{hitem.DisplayBinding}}' headerText='{{hitem.HeaderText}}' width='120'></e-column>
            <ng-container [ngSwitch]="viewmode">
                <ng-template *ngSwitchCase="'widget'" #rowTemplate let-data>
                        <ng-container *ngTemplateOutlet="gridWidgetItemTemplate; context: {$implicit: data}"></ng-container>
                <ng-template *ngSwitchCase="'all'" #rowTemplate let-data>
                        <ng-container *ngTemplateOutlet="gridItemTemplate; context: {$implicit: data}"></ng-container>

1 Reply

DR Dhivya Rajendran Syncfusion Team May 17, 2018 12:05 AM

Hi Brijesh, 
Thanks for contacting Syncfusion support. 

We have validated your code example and the reported issue has been reproduced at our end. We confirmed “Row elements are not available while using ngSwitch in row template” as a defect and logged a report for the same. The fix will be available in any of our upcoming release. 

Live Chat Icon For mobile
Up arrow icon