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

Stacked headers

Hi,
I'm currently testing the ejGrid and I was trying to create grid with stacked header. I know they're available in the JS version, but haven't found the Angular 2 implementation so I've got 2 questions:

Is this option supported in angular 2 ?
If yes, do you have some example how this should be implemented ?

regards,
Michal 

1 Reply

JK Jayaprakash Kamaraj Syncfusion Team June 6, 2017 07:32 AM UTC

Hi Michal, 

Thank you for contacting Syncfusion support. 

Yes, we have stacked header feature in angular2. We have prepared a sample with stacked header that can be downloaded from the following location, 



<ej-grid [allowPaging]="true" [pageSettings.pageSize]="pagesize" [dataSource]="gridData" showStackedHeader="true"  [stackedHeaderRows]="stackedHeaderRows"> 
    <e-columns> 
        <e-column field="EmployeeID" headerText="Employee ID" width="90" textAlign="right"></e-column> 
        <e-column field="FirstName" headerText="First Name" width="90"></e-column> 
        <e-column field="LastName" headerText="Last Name" width="90"></e-column> 
        <e-column field="Country" headerText="Country" width="90"></e-column> 
    </e-columns> 
 
</ej-grid> 
 
Grid.component.js 
 
GridComponent = (function () { 
                function GridComponent() { 
                    this.gridData = window.employeeView; 
                    this.pagesize = 5; 
                                  this.stackedHeaderRows=[{stackedHeaderColumns:[{headerText:"ID",column:"EmployeeID,FirstName"},{headerText:"Country",column:"LastName,Country"}]}]; 
 
                } 

Regards, 

Jayaprakash K. 
 


Loader.
Up arrow icon