Hi,
I'm implementing my own form of pagination, and want to call .load() on the AssignmentStore for getting the next set of records after I have set the new starting point. It seems the store is cleared first when you call .load(), is that correct? Can that be overridden so the next set of records is just added to the existing records?
Thank you.
Support Forum
Basically pagination is supported. Please see https://www.bryntum.com/docs/gantt/#Core/data/AjaxStore#function-loadPage (see all related properties and configs by searching for 'page' name in the docs). Also we have an example here: https://www.bryntum.com/examples/grid/paged/
'load' method will use 'loadPage' internally if you have 'pageParamName' or 'pageStartParamName' defined.
https://www.bryntum.com/docs/scheduler/#Core/data/AjaxStore#function-add
AssignmentStore is an AjaxStore, so pagination is supported in theory. But to be able to schedule tasks all related stores should contains full data. So having AssignmentStore partially loaded can affect the data you see on the chart and you'll get wrong calculation. Could you please describe your use case. What's your requirements and what exactly you're trying to implement?
'load' method will use 'loadPage' internally if you have 'pageParamName' or 'pageStartParamName' defined.
https://www.bryntum.com/docs/scheduler/#Core/data/AjaxStore#function-load always overrides current data with the new set from server. You can return from server old records + new records. Also you can do a separate ajax call and use store API to add new records to the store:It seems the store is cleared first when you call .load(), is that correct? Can that be overridden so the next set of records is just added to the existing records?
https://www.bryntum.com/docs/scheduler/#Core/data/AjaxStore#function-add
AssignmentStore is an AjaxStore, so pagination is supported in theory. But to be able to schedule tasks all related stores should contains full data. So having AssignmentStore partially loaded can affect the data you see on the chart and you'll get wrong calculation. Could you please describe your use case. What's your requirements and what exactly you're trying to implement?
Pavlo Miklashevych
Sr. Frontend Developer
Yeah, it's not so much a pagination I'm trying to create actually. More an "infinite scroll" idea, where as the user reaches the bottom, the next x records are fetched. That works for tasks, where I do a separate ajax call and use store.add. I think I will try the same for the assignments, but I just didn't want to duplicate all the logic I apply after fetching but before adding them to the store.