Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Contributor
Posts: 68
Registered: ‎11-12-2015
Accepted Solution

Row action is disabled after the first dependency resolved event in FormTable

Hi all,

 

I have a formtable with some row action. The content of this formtable is dependent on other fields in form, which are filled with some formaction - click on button. Here is a problem - when I click on the button to fill formfields and change the content of the formtable, the formtable is filled correctly, but the row action is disabled. When I click on the button again, the row action is enabled and everything works. It means I have to click twice to enable row action.

 

What causes this behaviour? 

 

I tried to use something like (at the end of button action):

IG.getItemById('Ftb').relod().done(function(){IG.getItemById('Ftb').enable()})

 But it is not working. 

 

Is there any way to catch the event after dependency is resolved in formtable? I guess that I can use enable() function after that event and it should work.

 

Thank you

 

Tereza

Highlighted
Staff
Posts: 1,088
Registered: ‎10-18-2015

Re: Row action is disabled after the first dependency resolved event in FormTable

Hi Tereza,

 

you may try with the 

 

'dependency:resolved'

event, but sometimes the events are tricky on formtables.

 

HTH,

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Highlighted
Contributor
Posts: 68
Registered: ‎11-12-2015

Re: Row action is disabled after the first dependency resolved event in FormTable

Hi Stefano,

 

I tried to use

IG.vent.on('dependency:resolved' , ...)

but unfortunately, it does not work.

 

Anyway, thanks for your reply.

 

Tereza

Highlighted
Staff
Posts: 1,088
Registered: ‎10-18-2015

Re: Row action is disabled after the first dependency resolved event in FormTable

you might try by subscribing to the change of formTable and enable it there, something like

 

 

form.getItemById('formTable').value.subscribe(IG.getItemById('formTable').enable());

 

 

ciao,

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Highlighted
Contributor
Posts: 68
Registered: ‎11-12-2015

Re: Row action is disabled after the first dependency resolved event in FormTable

Thank you Stefano,

this solution seems to be working.

 

Tereza