Skip to Content

How to bind combobox inside sap.m.table..??

Sep 26, 2017 at 09:03 AM


avatar image

Hi All,

I want to add row in the sap.m.Table in that one field having combobox. I'm not able to get the value in combobox. I created on json model and bind with table while click add button new row is adding but in combobox value is not binded. pls suggest some idea.

Table Code:

<Table id="idincrementTablea" items="{/}" >

<headerToolbar> <Toolbar> <ToolbarSpacer/> <Button icon="sap-icon://add" press="rowadd" /> </Toolbar> </headerToolbar>

<columns> <Column demandPopin="true" hAlign="Center"> <Label text="Item" design="Bold" /> </Column>

<Column demandPopin="true" hAlign="Center"> <Label design="Bold" text="Material" /> </Column>

<Column demandPopin="true" hAlign="Center"> <Label text="Description" design="Bold"/> </Column>

</columns> <items>

<ColumnListItem id="idincrementTablecolumn"> <cells>

<Text text=""/>

<ComboBox id="matrl" placeholder="Select Type" selectionChange="getval"> </ComboBox>

<Text id="descp" text=""/>


</ColumnListItem> </items> </Table>

_routePatternMatch: function(oEvent){

var matrlnum = this.byId("matrl");

var ucrItems = new sap.ui.core.ListItem({ key:"{Maktx}", text:"{Matnr}" });

var cFilters = [new sap.ui.model.Filter("ImPlant", sap.ui.model.FilterOperator.EQ, '1000'), new sap.ui.model.Filter("ImLgnum", sap.ui.model.FilterOperator.EQ, '001')];

var cSorter = new sap.ui.model.Sorter("Matnr");

matrlnum.bindAggregation("items", { path: '/GET_MATERIAL_LISTSet', template: ucrItems, sorters: cSorter, filters: cFilters });

var attach1 = this.byId("idincrementTablea");

obj1={Tabix:"", Matnr:"", Werks:"" }; att1.push(obj1);

var oModelatt = new sap.ui.model.json.JSONModel(att1);



10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Arjun Biswas Sep 26, 2017 at 10:53 AM

Go to the following URL. Maybe you are trying to do something like the one presented there.


10 |10000 characters needed characters left characters exceeded