BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
const apiCallResult = {
data: [ {...}, {...}], // 2 records returned
totalRecords: 6
};
const grid = new Grid({
dataSource: [],
pageSettings: {
pageSize: 2,
totalRecordCount: 0,
pageCount: 1
},
...
});
grid.dataSource = apiCallResult.data;
grid.pageSettings.totalRecordCount = apiCallResult.totalRecords;
grid.pageSettings.pageCount = 3;
var dm = new DataManager({ url: "https://js.syncfusion.com/ejServices/Wcf/Northwind.svc/Orders" });
dm.executeQuery(new Query().requiresCount().skip(0).take(5)).then((e) => {
grid.dataSource = {
result: e.result,
count: e.count
}
});
|
let grid: Grid = new Grid(
{
......
dataStateChange: (e) => {
dm.executeQuery(new Query().requiresCount().skip(e.skip).take(e.take))
.then((e) => {
grid.dataSource = {
result: e.result,
count: e.count
}
});
}
});
|
Hi all,
The first one, this is great libs for me.
Currently, I have the same issue too.
I have created grid with init pageSettings:
pageSettings = {
currentPage: 1,
pageNumber: 1,
pageSize: 5,
pageCount: 1,
totalRecordsCount: 1,
pageSizes: true
}
after that I have called API to set for grid's data source and
update the pageSettings object or set the settings via
this.Grid.pageSettings.totalRecordsCount = <new_value>
this.Grid.pageSettings.pageCount = <new_value>
BUT it's not working exactly.
So I tried with solution:
setTimeout(() => {
this.Grid.pageSettings.totalRecordsCount = <new_value> ;
this.Grid.pageSettings.pageCount = <new_value> ;
}, 100);
and this working.
I hope this issue will update soon. That all for this.