Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

onAfterwrite on GridField?


Reply


3 Posts   469 Views

Avatar
esakrielaart

Community Member, 58 Posts

14 July 2012 at 8:33am

Hi all,

digging into GridField, I'm wondering if there is a way to perform actions like page-reload when a relation is written using GridField and the GridFieldConfig_RelationEditor (so handleAction is called with action 'addto' for instance).

I know onAfterWrite() is triggered upon saving a form generated with getCMSFields(), but this GridField is a form generated within getCMSFields and may save relations before clicking the 'general' save button.

Friendly regards,
Maurice

Avatar
Reflektera

49 Posts

12 September 2012 at 12:02am

Did you solve this? Pls say you did...

Avatar
esakrielaart

Community Member, 58 Posts

12 September 2012 at 7:44pm

Hi,

although I did not yet solve this, you might try things using jQuery/entwinte as I think you need some technique of those to be able to 'dynamically' add or remove classes from the gridfield. I didn't have the need for it anymore at this point, but if I work it out in the future, I sure let you know.

Friendly regards,
Maurice