|
[App.component.html]
<button ejs-button [isPrimary]="true" (click)="btnClick()">Change parent height</button>
<div class="control-section" style="height: 600px">
<ejs-grid #grid class="e-gridcontrol" [dataSource]='vData' [enableVirtualization]='true' [enableColumnVirtualization]='true' height='100%' >
</ejs-grid>
</div>
|
|
[App.component.css]
// we need to set height as 100% for Grid element too.
.e-gridcontrol {
height: 100%;
}
btnClick(){
var gridContainer = document.getElementById('Parent_container');
gridContainer.style.height = 400 + 'px'
} |