cancel
Showing results for 
Search instead for 
Did you mean: 

WD radio buttons

Former Member
0 Kudos

Hey all

Please try to help..

I have a table with data I am getting from a backbend system, to that table I want to add radio buttons in every row, how would you l do that? I tried to add a column with a cell editor of radio button,. but I am getting it disabled.

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hey

SOLVED

Don't forget to set the Table to be "readonly" --> false , and set it to be nonselectable by changing "rowSelectable --> false" and "selectionMode --> none"

Former Member
0 Kudos

Hi,

You have to specify a context for the selected key and key to select property of the UI elements to enable it.

Regards,

Murtuza

Former Member
0 Kudos

Thanks

Well that's what I did I specified an attributes for selected key and key to select, and still nothing , I need that the radio buttons will be the main select on the table and for now I can only select a row which is not good enough

Oren

Former Member
0 Kudos

After binding the context to the radio button UI element you got the radio button enabled or not?

You are going in a right direction.

1. Create a column in table.

2. set the cell editor as Radio button.

3. Bind its property selected key and key to select.

Now run the application. You should get radio buttons enalbed on the screen.

Hope, you are not checking it at design time.

Regards,

Murtuza

former_member485701
Active Participant
0 Kudos

Hi Oren

If you done everything correct as said in the above conversation:-

Then check the following things

(1) Let say, you have binded your table's datasource property with "NODE1"

(2) Then your radio button's property selectKey and keyToSelect should come under same context node "NODE1".

(3)If you use any other node like "NODE2" for this then your radio button will be disabled because of cardinality

Regards,

Praveen

Former Member
0 Kudos

Hey thanks

Well I did it under the same nod but still nothing, can I bind the selected key and the key toselect to an attribute that already there? or should I make new ones??

former_member485701
Active Participant
0 Kudos

HI,

You can use the same node and create two more attributes and bind with the radio cell editor.

Regards,

Praveen

Former Member
0 Kudos

Hi Praveen

well I connected the selected key to a new attribute that holds data from the table, the keyToSelect I tried connecting to a different attribute and to nothing but simple text and still no luck, the thing is that I either get it disabled and already marked or empty and I cant mark them

former_member197348
Active Contributor
0 Kudos

Hi Oren,

Create a <b>value node</b> in your <b>modelnode (Parent node)</b> with properties singleton false cardinality 1..1. Create a context attribute in the childnode. Bind this attribute to your tableCell RadioButton.

regards,

Siva.

former_member485701
Active Participant
0 Kudos

Hi oren,

you have to implement the action onSelect of radio button.

I will give a way to test it.

(1)First populate your table node.

(2)Then create method for OnSelect action of radiobytton.

(3)Now write the following code there.

IWDNodeElement element=wdcontext.node<TableNodeName>.getcurrentElement();

element.setAttributeValue("SelectedKey",true);

Now when you click on any radio button, this method will be called and you can select or deselect the selected radio buttons.

Regards,

Praveen

Regards,

Praveen

Former Member
0 Kudos

Hi Oren

Is it work now?

Former Member
0 Kudos

Pravven

Hey thanks alot but still I miss something, now I made a new node with the right cardinality but singeltone true cause it wont let me to change it, any how I created the attribute "key1", bind the radio button both selectedkey and keytoselect

to the attribute, implemented the action and still I get it disabled and marked (the radio buttons).

now another question is why in your method you wrote

element.setAttributeValue("SelectedKey",true); the ",true" is not right cause it wanst an element not a boolean so I guest its the attribute key1 right???