Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 21, 2015 at 12:00 PM

    look at this code

    SAPUI5 Explored

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 21, 2015 at 12:01 PM

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

    Regards,

    Sai Vellanki.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.