I was currently working on UI5 .I need to divide the rows and columns of a table in SAP UI5.What is the approach for that.Suggest me.
Hello,
Your requirement is not very clear. If you want to use Table Control, You can take this example :
Columns are declared independently from rows. If you want to modify this case, please elaborate more and members will respond to your request.
<Table id="idProductsTable" inset="false" items="{ path: '/ProductCollection', sorter: { path: 'Name' } }"> <headerToolbar> <Toolbar> <Title text="Products" level="H2" /> </Toolbar> </headerToolbar> <columns> <Column width="12em"> <Text text="Product" /> </Column> <Column minScreenWidth="Tablet" demandPopin="true"> <Text text="Supplier" /> </Column> <Column minScreenWidth="Tablet" demandPopin="true" hAlign="Right"> <Text text="Dimensions" /> </Column> <Column minScreenWidth="Tablet" demandPopin="true" hAlign="Center"> <Text text="Weight" /> </Column> <Column hAlign="Right"> <Text text="Price" /> </Column> </columns> <items> <ColumnListItem> <cells> <ObjectIdentifier title="{Name}" text="{ProductId}" /> <Text text="{SupplierName}" /> <Text text="{Width} x {Depth} x {Height} {DimUnit}" /> <ObjectNumber number="{WeightMeasure}" unit="{WeightUnit}" state="{ path: 'WeightMeasure', formatter: 'sap.m.sample.Table.Formatter.weightState' }" /> <ObjectNumber number="{ parts:[{path:'Price'},{path:'CurrencyCode'}], type: 'sap.ui.model.type.Currency', formatOptions: {showMeasure: false} }" unit="{CurrencyCode}" /> </cells> </ColumnListItem> </items> </Table>