Configuring Detail Client Module

I've have attempted this myself but arrived at the conclusion it's not straightforward, I would rather ask than guess.  Two questions:

 

I want to set the enabled flag of a button depending on whether there are records in the detail with a particular flag set:

  1. Which function do I need to override to initialise the button when the detail loads?  (I have configured 'onGridDataLoaded()' but this is called three times before the detail is loaded.)
  2. Which function do I need to override when a user edits a detail record and changes the value of the flag?  ('onDataChanged()' which doesn't seem to be documented seems to do this.)

Thanks in advance,

Like 0

Like

1 comments

Hello Gareth,

 

1) You need to use the "visible" property for the button in case you need to display it or not based on some condition. As an example there is the getToolsVisible method of the UpButton button in the ProjectStructureDetailV2 detail (on the project page).

 

2) onDataChanged is indeed initialized when something is changed in the detail record.

 

Best regards,

Oscar

Show all comments