Grid with Stacked Header (e-column with ngfor condition)

Image_8247_1692361346555

Output :

Image_8288_1692361460867

Error :

Image_1737_1692361418712


1 Reply

RR Rajapandi Ravi Syncfusion Team August 21, 2023 07:34 AM UTC

Hi Suresh,


Greetings from Syncfusion support


As per your shared information, we have prepared a sample and tried to reproduce your reported problem at our end, but it was unsuccessful. Please refer the below code example and sample for more information.


App.component.html

 

<ejs-grid [dataSource]="gridData" [allowPaging]='true'>

        <e-columns>

            <ng-container *ngIf="!!columns && columns.length > 0">

                <ng-container *ngFor="let column of columns; index as i">

                    <e-column [field]='column.field' [headerText]='column.headerText' [width]="column.width"

                        textAlign="Left" freeze='Left' minWidth=10></e-column>

                </ng-container>

                <ng-container *ngIf="!!staticHeaders && staticHeaders.length > 0">

                    <ng-container *ngFor="let staticHeader of staticHeaders; index as i">

                        <e-column headerText='Offer Category' [columns]='staticHeader' [edit]='editparams'></e-column>

                    </ng-container>

                </ng-container>

            </ng-container>

        </e-columns>

    </ejs-grid>

 


Sample: https://stackblitz.com/edit/angular-scttgm-smwc3w?file=src%2Fapp.component.ts,src%2Fapp.component.html


Screenshot:



Regards,

Rajapandi R


Loader.
Up arrow icon