Reputation: 1507
I have a Table with four column, in the last column I want to have two buttons in each row.
I have tried using static code in XML, but it's not working:
<Table id="tableid">
<columns>
<Column>
<Text text="Product" />
</Column>
<Column>
<Text text="Price" />
</Column>
<Column>
<Text text="compant" />
</Column>
<Column>
<Text text="Buttons" />
</Column>
</columns>
</Table>
<items>
<ColumnListItem>
<cells>
<Text text="TV"/>
</cells>
<cells>
<Text text="15000"/>
</cells>
<cells>
<Text text="samsung"/>
</cells>
<cells>
<Button text="Button1"/>
<Button text="Button2"/>
</cells>
</ColumnListItem>
</items>
Upvotes: 3
Views: 6568
Reputation: 59
I had the same need. I share a peace of my code, I include tooltip and didn't use texts in buttons:
<columns>
<Column>
<header>
<Text text="ID" />
</header>
</Column>
<Column>
<header>
<Text text="Name" />
</header>
</Column>
<Column>
<header>
<Text text="Actions" />
</header>
</Column>
</columns>
<ColumnListItem>
<Text text="{CustomerID}" />
<Text text="{ContactName}" />
<cells>
<HBox>
<Button icon="sap-icon://detail-view" type="Transparent" tooltip="View" press="onPressViewXXX"/>
<Button icon="sap-icon://begin" type="Transparent" tooltip="Reproc" press="onPressReprocXXX"/>
<Button icon="sap-icon://decline" type="Transparent" tooltip="Cancel" press="onPressCancelXXX"/>
</HBox>
</cells>
</ColumnListItem>
</Table>
Upvotes: 0
Reputation: 1742
You can use HBox control to get two buttons in single cell.
Here I have created jsbin for it.
Upvotes: 5