|
...
@Component({
selector: 'app-container',
styles: [
'.e-resizable {resize: both;overflow: auto;border: 1px solid red;padding: 10px;min-height: 250px;min-width: 250px;}'
],
template: `<p class="e-text"> The parent container can be resizable by dragging the bottom-right corner.</p>
<div class='e-resizable'>
<ejs-grid id='grid' [dataSource]='data' (created)="created()" height='100%' width='100%'>
<e-columns>
<e-column field='OrderID' headerText='Order ID' textAlign='Right' width=120></e-column>
...
</e-columns>
</ejs-grid>
</div>`
})
...
created(){
var grid = document.getElementById("grid");
grid.parentElement.style.height = window.innerHeight+"px";
}
} |
|
...
dataBound(){
this.grid.getContent().querySelector(".e-frozencontent").style.height="100%";
}
... |