Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
143034 | Mar 1,2019 09:27 AM UTC | Mar 5,2019 04:08 AM UTC | Angular - EJ 2 | 3 |
![]() |
Tags: Grid |
[scrolling.html]
<ejs-grid #grid [dataSource]='data' (dataBound)='dataBound($event)' height='400'>
<e-columns>
<e-column field='OrderID' headerText='Order ID' width='150' textAlign='Right'></e-column>
<e-column field='CustomerName' headerText='Customer Name' width='160'></e-column>
<e-column field='OrderDate' headerText='Order Date' format="yMd" width='155' textAlign='Right'></e-column>
<e-column field='Freight' headerText='Freight' width='130' format='C2' textAlign='Right'></e-column>
<e-column field='ShippedDate' headerText='Shipped Date' format="yMd" width='155' textAlign='Right'></e-column>
</e-columns>
</ejs-grid>
---------------------------------------------------------------------------------------------------------------------
[scrolling.component.ts]
public dataBound(args) : void{
if (this.grid.currentViewData.length * this.grid.getRowHeight() < parseInt(this.grid.height)) {
var hdTable = this.grid.getHeaderContent();
hdTable.style.paddingRight = ''
document.querySelector('.e-grid .e-content').style.overflowY = 'auto';
}
else {
var hdTable = this.grid.getHeaderContent();
hdTable.style.paddingRight = '16px';
document.querySelector('.e-grid .e-content').style.overflowY = 'scroll';
}
}
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.