Hi Bhavya,
Greetings from syncfusion support
From validating your query, we understand you like to enable sorting feature with virtual scrolling. You can enable sorting feature in Grid by setting allowSorting property as true. So based on your query we have prepared a sample and achieved your requirement. Please refer the below code example and sample for more information.
App.component.ts
export class AppComponent {
public vData: Object[] = virtualData;
@ViewChild('grid')
public grid: GridComponent;
public date1: number;
public date2: number;
public flag: boolean = true;
public ngOnInit(): void {
if (!this.vData.length) {
datasource();
this.grid.dataSource = this.vData;
}
this.flag = true;
this.date1 = new Date().getTime();
this.grid.refresh();
}
} |
App.component.html
<ejs-grid #grid [dataSource]='vData' [enableVirtualization]='true' [allowSorting]='true' [enableColumnVirtualization]='true' height='600'>
<e-columns>
<e-column field='FIELD1' headerText='Player Name' width='120'></e-column>
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
</e-columns>
</ejs-grid> |
If we misunderstood anything wrongly, Please share the below details
1) Please share your exact requirement with detailed explanation
2) Please share your issue scenario with pictorial representation.
Regards,
Rajapandi R