cancel
Showing results for 
Search instead for 
Did you mean: 

Button Visibility

Former Member
0 Kudos

Hi Experts,

I have buttons in a table which are by default disabled (set in the properties of the button).

Please tell me how to enable one programatically(at the trigger of an event).

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

<b>Context:</b>

Rows (node, 0:N)
-- buttonEnabled (attribute, boolean)

<b>Binding:</b>

Table.dataSource = Rows
Button.enabled = Rows.buttonEnabled

Example: To enable button in row at index 4:

wdContext.nodeRows().getRowsElementAt(4).setButtonEnabled(true);

Armin

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

As an add on to Suresh's Suggestion, u must create that boolean variable inside the table's node

Regards

Fahad Hamsa

Former Member
0 Kudos

All the answers are almost similar.

But these helped me solve my problem.

Thanks to all.

Giving reward points to all.

Thanks for helping me out.

Former Member
0 Kudos

Hi,

1)create an attribute Select as boolean datatype

2)Insert Button in the Table

3)Bind that Select attribute to the button( in properties)

4)In table,there is an option onLeadSelection create an action for this

write this code,

{

wdcontext.currentcontextelement.setSelect(true);

}

Former Member
0 Kudos

Hi,

Firstly, create a value attribute(context) of type BOOLEAN, for that view.

Map that context element to the "enabled" property of your button.

Now, in the DoInit() of that view, assign dat context, a default value, either true or false.

Now, you can set the button as enabled or disabled anywhre in the view, even from another views(by proper context mapping between views, using the MVC concept)

Regards,

Hanoz