Skip to Content
0
Aug 03 at 07:30 PM

Dropdown List for one column of a table with Odata binding.

96 Views

Hi All,

I have to display a table with three columns, and third column should have value from entityset zentity2 ( ID, Description)

Entity1 is the actual display of table ( name, flag ,desc{ three values from zentity2 as dropdown}).

Code in my view

	<ColumnListItem>
									<cells>
										<ObjectIdentifier text="{name}"></ObjectIdentifier>
										<ObjectIdentifier text="{flag}"></ObjectIdentifier>
										<ObjectIdentifier text="{desc}"></ObjectIdentifier>
										<Text text="{desc}"/>
										<Select items="{entity2}">
											<!-- here's the relative dropdown binding -->
											<core:Item key="{id}" text="{Description}"/>
										</Select>
									</cells>
								</ColumnListItem>

In My Controller

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

oModel.setData(oData);

this.getView().setModel(oModel);

As of now, I see a table with just three columns and no drop down in description column.