on 10-18-2005 6:48 PM
Hello,
I guess a little problem.
I got a table with a button-column. In some tablerows I got to disable the button. Not the disable-function is the problem.
When I loop over the table an disable a single button, all buttons are disabled. What is the correct coding?
Thanks a lot, Mario
Hi,
You need to create contextattribute of type "WDVISIBILITY" not string.
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mario,
Let me guess:
You are iterating over IWDTable column and set property of IWDButton table cell editor? Wrong approach.
Right approach: create context attribute with type boolean, and bind "enabled" property of button to this attribute. Make sure that you are creating this attribute either directly in the same node that you are using as table source, or in <b>non-singleton</b> child of thereof.
Also by default boolean attributes has "false" value, so either set them to true in wdDoInit or in supply function.
To enable/disable button just set attribute value to true/false for corresponding node element (element index == row in table)
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot.
How about visiblty?
I can not create a value attribute, which contains only the values:
- blank
- none or
- visible
Just these three values are allowed for a button's visiblty (similar to true/false for enabling).
I tried it with a STRING-value attribut. But that dowsn't work.
Regards Mario
Add a boolean context attribute "ButtonEnabled" under the context node that is used as the table data source.
Bind the Button.enabled property of the table cell editor to this attribute.
Then you can control the enabled state of the button in row #i by the attribute value of the node element at index #i.
Armin
Message was edited by: Armin Reichert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.