cancel
Showing results for 
Search instead for 
Did you mean: 

How can we enable or disable an action button?

Former Member
0 Kudos

Hi,

Can any one please suggest as to how to enable or disable Action Button dynamically without binding the "Enable" property of a the button to a context attribute?

Thanks and Regards,

Smriti

Accepted Solutions (0)

Answers (2)

Answers (2)

luciano_leitedasilva
Contributor
0 Kudos

Hi Smriti,

When you create a Button you must to assign a action to this button. Enabling or disabling this action will disabe the button. you can do this by code:

You have a action called Cancel

wdThis.wdGetCancelAction().setEnabled(true/false);

Regards,

Luciano

Former Member
0 Kudos

Thanks Armin.

Former Member
0 Kudos

Either you can disable the action itself (which will disable all UI elements using this action automatically) or bind the "enabled" property of the UI element to a boolean context attribute and set the attribute value to "false".

Armin

Former Member
0 Kudos

Hi Armin,

Thanks for your reply. How can we disable the action itself? Can you please provide the code snippet?

Regards,

Smriti.