The Grid component has callback functions, called after Add, Remove or Update of a row. These callback functions can be used for synchronization with a back-end. In the client side, you can use 'addrow', 'deleterow', 'updaterow' to update one or multiple rows at once. After you call any of these methods, the data source object's callback functions are called. The last parameter in the callback functions is 'commit'. 'commit(true)' confirms the client-side changes when called, 'commit(false)' cancels the user operation. This is useful if the back-end synchronization failed. In this demo page, the buttons for 'CRUD" operations are displayed in the Grid tool bar area.
Loading...