<ejs-grid #grid [dataSource]='data' [enableVirtualization]='true' height=500>
</ejs-grid> |
Hi Shamil,
Thanks for contacting Syncfusion support.
From your code we found that you have provided the height to Grid in percentage. This percentage value is caused this issue. So please provide the static number to Grid height instead of using the percentage(like as following code snippet),
<ejs-grid #grid [dataSource]='data' [enableVirtualization]='true' height=500></ejs-grid>
We have attached the demo virtualization sample with this update for your reference and you can find that demo in the below link,
Regards,Madhu Sudhanan P
<div style="height:500px"> // provided the parent height
<ejs-grid #grid [dataSource]='data' [enableVirtualization]='true' (dataBound)="dataBound($event)" height='100%' [pageSettings]="initialPage">
...
</ejs-grid>
</div>
export class VirtualizationComponent implements OnInit {
public ngOnInit(): void {
datasource();
this.data = virtualData;
this.initialPage = { pageSize: 50 };
}
dataBound(args) {
let isInitialRender = true;
if (isInitialRender) {
isInitialRender = false;
(this.grid.contentModule as any).virtualEle.adjustTable(0, 0);
}
}
} |
Hi Isanka,Thanks for your patience.We are glad to announce that our Essential JavaScript 2 patch release (17.1.40) has been rolled out successfully and in that release, we have added the fix for an issue “Virtualscroll is not working properly when set the Grid height as percentage”.Regards,Thavasianand S.
<div style="height: 400px">
<ejs-grid #grid [dataSource]='data' [enableVirtualization]='true' height='100%'>
</ejs-grid>
</div> |
Hi Neo,
Query #1: I installed the version 17.1.42 and tried to enable virtualization. But It didn't work. Still has the same issue.
We are unable to reproduce this issue in our latest version. We suspect that you did not provide the parent element for the Grid. We must need to provide parent element to Grid when we provide height in percentage. Please refer the below code snippet,
<div style="height: 400px"><ejs-grid #grid [dataSource]='data' [enableVirtualization]='true' height='100%'></ejs-grid></div>
Query #2: ERROR TypeError: Cannot read property 'blockIndexes' of undefined
We are unable to reproduce this issue at our end. Please share the full stack trace of the issue. This will help us to provide the solution for this issue as early possible.
Regards,Hariharan
Hi Neo,
We are unable to reproduce the “'blockIndexes' of undefined ” issue in our latest version. So, please share the below details to us. This will help us to provide a better solution for the reported issue as early as possible.
- Please share the screenshot of the issue (to know the full stack trace).
- If possible, please share the issue reproducible sample to us.
Regards,Thavasianand S.