Hi Dina,
Thanks for contacting Syncfusion’s support.
Based on your requirement, we have created a sample that can be downloaded from the below link.
In that sample, we have performed on-demand paging by enable virtualScrolling and please refer to the below code example.
appComponent.html
<ej-grid #grid [dataSource]="gridData" [allowScrolling]=true
[allowPaging]="true"
[query] = "queryorder">
. . .
</ej-grid>
appComponent.ts
public gridData = ej.DataManager({
adaptor: new ej.ODataV4Adaptor()
});
public queryorder = new ej.Query().from('Orders');
. . .
}
|
We have included angular2 sample also with in the project (EJGrid\angular2\ejGrid_Vpaging - Copy\ejGrid_Vpaging)
Procedure for run the attached sample
1) Run the EJGRid Application and note down the LocalHost link (In our case, port number is 49339)
2) Run the Angular2 Application Separately
3) Use the EJGrid’s port number as Origin for the Angular2 Application and use them as shown below
Regards,
Saravanan A.