Skip to Content

Column header for radtiobuttongroup in sap.mtable

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

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

    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

    Add comment
    10|10000 characters needed characters exceeded