|
[gridcomponent.html]
<ej-grid #grid [dataSource]="gridData" [allowPaging]="false" [allowSorting]="false" [isResponsive]="true" [allowGrouping]="true" [groupSettings]="groupSettings" [allowScrolling]="true" [scrollSettings]="scrollSettings">
<e-columns>
<e-column headerText="Photo">
<ng-template e-template let-data>
<div *ngIf="data.EmployeeID">
<img style="width: 75px; height: 70px" [attr.src]="'app/Content/images/grid/Employees/' + data.EmployeeID + '.png' " [alt]="data.EmployeeID" />
</div>
</ng-template>
</e-column>
….
</e-columns>
</ej-grid>
[gridcomponent.ts]
export class GridComponent {
….
constructor()
{
this.gridData = window.gridData;
this.groupSettings = { groupedColumns: ["ShipCountry"], showUngroupButton: false, showGroupedColumn: false, showDropArea: false };
this.scrollSettings = { width: "auto", height: 745 };
} |
[HTML]
<ej-tab id="Test">
<ul>
<li><a rel='nofollow' href="#tab1">Tab 1</a></li>
<li><a rel='nofollow' href="#tab2">Tab 2</a></li>
</ul>
<div id=" tab1">
<component-with-grid></component-with-grid>
</div>
<div id=" tab2">
<component-2></component-2>
</div>
<ej-tab/>
I also tried loading the content of the tabs on demand but to no avail.
|
<ej-tab id="tabsample">
<ul>
<li><a rel='nofollow' href="#tab1">Grid1</a></li>
<li><a rel='nofollow' href="#tab2">Grid2</a></li>
<li><a rel='nofollow' href="#tab3">Empty</a></li>
</ul>
<div id="tab1">
<ej-grid #grid [dataSource]="gridData" [allowPaging]="true" [allowSorting]="true" [isResponsive]="true" [allowGrouping]="true" [groupSettings]="groupSettings" [allowScrolling]="true" [scrollSettings]="scrollSettings">
<e-columns>
<e-column field="OrderID" headerText="OrderID" width="80"></e-column>
<e-column field="EmployeeID" headerText="EmployeeID" widht="120"></e-column>
<e-column field="ShipCity" headerText="ShipCity" width="80"></e-column>
<e-column field="ShipCountry" headerText="ShipCountry" width="80"></e-column>
<e-column field="Freight" headerText="Freight" width="80"></e-column>
</e-columns>
</ej-grid>
</div>
…..
</ej-tab>
[component.ts]
constructor()
{
//The datasource "window.gridData" is referred from 'http://js.syncfusion.com/demos/web/scripts/jsondata.min.js'
this.gridData =window.gridData;
this.scrollSettings = { width:300, height:400 };
}
|
"syncfusion-javascript": "^15.4.20"
"ej-angular2": "^15.4.21"
Screenshot of the problem:

You can see that scroll is not rendered at all. It is also not working when I'm scrolling with the mouse wheel.
|
<ej-tab id="tabsample">
<ul>
<li><a rel='nofollow' href="#tab1">Grid1</a></li>
<li><a rel='nofollow' href="#tab2">Grid2</a></li>
<li><a rel='nofollow' href="#tab3">Empty</a></li>
</ul>
<div id="tab1">
<ej-grid #grid [dataSource]="gridData" [allowPaging]="true" [allowSorting]="true" [isResponsive]="true" [minWidth]="width" ….
<e-columns>
…..
</e-columns>
</ej-grid>
</div>
<div id="tab2">
<ej-grid #grid1 [dataSource]="gridData" [allowPaging]="true" [isResponsive]="true" [minWidth]="width" [allowScrolling]="true"
…..
</ej-tab>
[component.ts]
constructor()
{
this.dataManager = new ej.DataManager({
crossDomain:true
});
this.gridData = this.dataManager;
this.scrollSettings = { width:600 };
this.minwidth = 700;
} |