Skip to Content
avatar image
Former Member

Display check box in list

Hi All,

Please let me know how to display checkboxes in list as below attached screenshot .

below is my code in XML view to display the view data  :

<List growing="true" growingScrollToLoad="true" id="staging" mode="SingleSelectMaster" noDataText="{i18n&gt;masterListNoDataText}"

  select="onSelect">

  <items>

    <ObjectListItem id="mainListItem2" markFavorite="false" markFlagged="false"

  numberUnit="{}"

  press="" showMarkers="true" title="{/path}"  type="{device&gt;/listItemType}" icon="" >

    

  <attributes>

  <ObjectAttribute text="{/path}" />

  </attributes>

  <core:ExtensionPoint name="extListItemInfo"/>

  </ObjectListItem>

  </items>

  </List>

Regards,

Vamsi

view.png (9.4 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 21, 2015 at 11:45 AM

    Well if you use multi select, the list will display check booxes on its own.

    You need to be in multi select mode.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 21, 2015 at 12:00 PM

    look at this code

    SAPUI5 Explored

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 21, 2015 at 12:01 PM

    Change your list mode from "SingleSelectMaster" to "MultiSelect.

    Regards,

    Sai Vellanki.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 21, 2015 at 12:03 PM

    Thanks guys... I figured it myself ::

    var oRowTemplate = new sap.ui.commons.layout.MatrixLayoutRow({

      cells: [

      new sap.ui.commons.layout.MatrixLayoutCell({

      content: new sap.ui.commons.Label({text:"propertyName:"})

      }),

      new sap.ui.commons.layout.MatrixLayoutCell({

      content: new sap.ui.commons.TextView({text:"{propertyValue}"})

      })

      ]

      });

      oMatrixLayout.bindAggregation("rows", "/properties", oRowTemplate);

    Add comment
    10|10000 characters needed characters exceeded