cancel
Showing results for 
Search instead for 
Did you mean: 

Button disable

Former Member
0 Kudos

Hi ,

I have 2 buttons in my application.If i click on first button second button should be disabled.how to proceed on this?

Regards,

Pavani

Accepted Solutions (0)

Answers (3)

Answers (3)

gill367
Active Contributor
0 Kudos

Hello,

Make a context attribute of type boolean (say SecondButtonEnbPro ) bind it to the enbable property of the second button.

Write the following code in the action event handler of the first button

  wdContext.currentContextElement().setSeconButtonEnbPro(false);

Thanks,

Sarbjeet

Former Member
0 Kudos

First off, bind the second button's property 'enabled' to a boolean attribute on your context. And the 'onAction' method of your first button, just set that to 'false' disable the second button.

i.e. wdContext.currentContextElement().setSecondButtonEnabled("false");

Regards,

Jan

Former Member
0 Kudos

Hi,

Create an action for the first button(through properties tab). Create an attribute(button2Enable) of type boolean and map the Enabled property of the second button to the attribute.

In the action of the first button write the following:

wdContect.currentContextElement().setButton2Enabled(false);

Hope it helps and search before you post(a suggestion).

Regards,

Manoj