oria / gridx

Just another powerful Dojo grid
Other
162 stars 78 forks source link

Unable to hook OnSave #394

Open naris opened 7 years ago

naris commented 7 years ago

I am unable to hook the OnSave event. I have tried: grid.connect(grid, 'onSave', onSaveFunc); grid.connect(grid.model, 'onSave', onSaveFunc); grid.connect(grid.edit, 'onSave', onSaveFunc); and a lot of other things, even using grid.on, and aspect yet nothing will execute for onSave().

I have stepped through the gridx code and the Modifly.OnSave() method does indeed get executed.

naris commented 7 years ago

I have finally managed to hook OnSave with this: grid.connect(grid.model._exts.modify, 'onSave', onSaveFunc); However, that is very unintuitive and seems really wrong.

sheila1227 commented 7 years ago

@naris You could execute your callback like this: grid1.model.save().then(onSaveFunc);