Hi,
I am using a custom url adaptor with my grid. extendin UrlAdaptor.
I am adding a new record programically from through a button click usn
this.grid.addRecord(data, selectedRow);
I am initializing the datasource as this:
ngAfterViewInit() { // Ensures grid is initialized before use
this.data = new DataManager({
url: 'http://localhost:8080/Items',
insertUrl: 'http://localhost:8080/Items/insert',
adaptor: new CustomUrlAdaptor(this.grid, this.loginService),
//headers: [{ 'Authorization': `${this.loginService.getAuthorizationBearer()}` }]
});
}
I have seen that right after a call to addRecord, the grid issues a full fetch from the server for all the records. If there are thousands of records, this could be very time-consuming. What is the reason for this?, can it be avoided, provided that it is one record that has been added, that should be added to the grid, and the call to the server to add has worked, so it has been added. I understand that the new record may not satisfy whatever filter being applied or criteria, but would it be possible to add the new record into the grid, without needing to refetch all records?.
Many thanks in advance,
Guillermo