Skip to Content
0

Column header for radtiobuttongroup in sap.mtable

Jul 10, 2017 at 11:46 AM

24

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member Jul 18, 2017 at 10:07 AM
0

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


rb.png (1.8 kB)
Share
10 |10000 characters needed characters left characters exceeded