Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Radio Button as a Table cell editor

Hi,

I have a table with one on the columns as a radio button.

( I have used the 'Radio Button' UI element )

The structure is as follows:

--Root node

-


Table node (Model node 'li_allocations ')

-


RadioButton node (Value Node)

-


KeyToSelect value attribute

--SelectedKey value attribute

I have bound the 'KeyToSelect' and the 'SelectedKey' properties to the respective attributes in the structure.

I have used the following code to set the values for the 'KeyToSelect' attribute

public void supplyRadioButton(IPrivateSarniaAllocationFetchView.IRadioButtonNode node, IPrivateSarniaAllocationFetchView.ILi_AllocationsElement parentElement)

{

//@@begin supplyRadioButton(IWDNode,IWDNodeElement)

int rows = wdContext.nodeLi_Allocations().size();

for(int i=0;i<=rows;i++)

{

IPrivateSarniaAllocationFetchView.IRadioButtonElement element = node.createRadioButtonElement();

node.addElement(element);

element.setKeyToSelect("KEY_"+i);

}

//@@end

}

But the following problem occurs.

1) No matter which row I select the SelectedKey attribute has KEY_0 as its value

2) Even when I click on the other columns (other than the radio button column) the radio button of that row gets selected. I want the Radio button selection to be independent of the selections I make in my other columns.

Can someone help me out?

Thanks in advance,

Reena

replied

Reena,

I suggested cardinality 1..1, please try cardinality 0..1 as well (error message could be misleading, only adding to 1..1 is forbidden)

VS

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question