Discuss anything related to web development but no technical support questions


Post by sandippatel »

Hello

Would it be possible to change the sync request structure for Bryntum Gantt?

I have examine that when we sync the data Bryntum automatically generate the sync request and call the API.I want only few field to be sync on server rather than whole sync request. would it be possible?

Also I have seen that it gives me delta changes rather whole data. what need to be done to get the whole data available on Bryntum Gantt chart?

Thanks for your amazing support.


Post by sergey.maltsev »

Hi!

I can suggest you to use

This method to convert CrudManager format to any server request format you need
https://www.bryntum.com/docs/gantt/#Scheduler/crud/AbstractCrudManagerMixin#function-encode

This method to convert any server response to CrudManager format
https://www.bryntum.com/docs/gantt/#Scheduler/crud/AbstractCrudManagerMixin#function-decode

Check this option to have all fields for sync requests
https://www.bryntum.com/docs/gantt/#Gantt/model/ProjectModel#config-writeAllFields

Also please refer to this info
https://www.bryntum.com/docs/gantt/#guides/data/crud_manager.md


Post by sandippatel »

Hello

even if I have added the property "writeAllFields" still I only get the delta changes. my requirement is to get all the records in each sync request whether it modified or not. Is this possible?

gantt.png
gantt.png (98.8 KiB) Viewed 2363 times

Post by mats »

” writeAllFields” means what it says, it includes all fields of every changed record.

You should look at Store.toJSON() to get all the data serialized.


Post by sandippatel »

Thanks Mats

but I am confuse about the usage. since Sync request use default payload or data to send change data to server where would I use

Store.toJSON()

in this case.


Post by mats »

You should not use our Project for syncing in this case as it is not defined for sending all data (extremely inefficient). You should handle this yourself instead, you can listen to https://bryntum.com/docs/gantt/#Gantt/model/ProjectModel#event-hasChanges to take care of the saving yourself.


Post Reply