cancel
Showing results for 
Search instead for 
Did you mean: 

Column header for radtiobuttongroup in sap.mtable

dirk_wieczorek
Participant
0 Kudos

Hello,

i have a radiobuttongroup in a sap.mtable.

It works fine the problem is that the radiobuttons are together in one column and i need to put the text for each radiobutton above it in the column header where the group is displayed.

I have the following code.

<content> <Table id="idTable3" items="{BuildingsModel>/Buildings/}" >
<columns>
<Column> <header> <Text text= "Yes No" /> </columns>
<ColumnListItem>
<RadioButtonGroup id="DeleteGroupFlag" columns="2"> <buttons>
<RadioButton id="DeleteYes"
select="onReceiverTypeSelect" text="Yes" selected="{= ${BuildingsModel>/Yes} === 'X' ? true : false}">
</RadioButton> <RadioButton id="DeleteNo"
select="onReceiverTypeSelect" selected="{= ${BuildingsModel>/No} === 'X' ? true : false}">
</RadioButton> </buttons> </RadioButtonGroup>
</ColumnListItem> </Table> </content>

If i run the code it gets the follwing result:

Yes No

RB1 RB2

I would need

Yes No
RB1 RB2

Can someone give me an advice how this is done?

Regrads.

Dirk

Accepted Solutions (0)

Answers (1)

Answers (1)

vaibhav_gb
Explorer
0 Kudos

Hi Dirk,

If my understanding is correct you need two different columns yes & No and in them you want the respective radio buttons then you can try the following code.

	<Table id="idTable3" >
						<columns>
							<Column>
								<header>
									<Text text="Yes"/>
									</header>
							</Column>
								<Column>
								<header>
									<Text text="No"/>
									</header>
							</Column>
						</columns>
						<ColumnListItem>
									<RadioButton id="DeleteYes" select="onReceiverTypeSelect"  groupName="group1" ></RadioButton>
									<RadioButton id="DeleteNo" select="onReceiverTypeSelect"  groupName="group1" ></RadioButton>
						</ColumnListItem>
					</Table>

Output is like this:

Regards

GB