on 09-26-2017 10:03 AM
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=""/>
</cells>
</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);
attach1.setModel(oModelatt);
},
Go to the following URL. Maybe you are trying to do something like the one presented there.
http://plnkr.co/edit/FCrGwsBM4K0E16XFEOEc?p=preview
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.