Skip to Content
avatar image
Former Member

How to divide rows and columns in a table with xml view in SAP UI5

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Dec 24, 2016 at 03:18 PM

    what are u talking about...............

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 24, 2016 at 04:26 PM

    I have to divide the columns in a table using xml code in sap ui5

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 25, 2016 at 06:48 PM

    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>				
    
    Add comment
    10|10000 characters needed characters exceeded