Skip to Content
0
Former Member
Apr 10, 2017 at 03:24 PM

Remove Items from Table SAPUI5

3206 Views Last edit Apr 10, 2017 at 03:25 PM 2 rev

I've a table

<Table id="idcorrelationData" inset="false" mode="MultiSelect" items="{/correlationData}">
	<headerToolbar>
		<Toolbar>
			<Title text="Correlation Data" level="H2"/>
			<ToolbarSpacer></ToolbarSpacer>
			<Button icon="sap-icon://add" press="onAddNewRow"/>
			<Button icon="sap-icon://delete" press="onRemoveLasRow"/></Toolbar>
	</headerToolbar>
	<columns>
		<Column hAlign="Center">
			<Text text="Data Location"/>
		</Column>
		<Column minScreenWidth="Tablet" demandPopin="true" hAlign="Center">
			<Text text="Accepted Value"/>
		</Column>
	</columns>
	<items>
		<ColumnListItem>
			<cells>
				<Input enabled="{/fieldEditAble}" value="{dataLocation}"/>
				<Input enabled="{/fieldEditAble}" value="{acceptedValue}"/>
			</cells>
		</ColumnListItem>
	</items>
</Table>

which is binded with the JSON. I've a button Delete i want to remove all selected rows from table on press button. How i can do that

	var correlationData = [{
				"dataLocation": "",
				"acceptedValue": ""
			}]