Skip to Content
avatar image
Former Member

Enable All input fields in SAPUI5 Table

I've a table which contain two columns. The number of rows are rendered dynamically. I've a Edit option to Edit any column in the Table.

Scenario is that, when I click on Edit button, All Input fields in Table should be enabled so i can modify any column data.

<Table id="idcoredata" inset="false" items="{/coredata}">
	<headerToolbar>
		<Toolbar>
			<Title text="Cor Data" level="H2"/>
		</Toolbar>
	</headerToolbar>
	<columns>
		<Column width="12em" hAlign="Center">
			<Text text="Action"/>
		</Column>
		<Column minScreenWidth="Tablet" demandPopin="true" hAlign="Center">
			<Text text="Weight"/>
		</Column>
	</columns>
	<items>
		<ColumnListItem>
			<cells>
				<Input enabled="false" text="{Action}"/>
				<Input enabled="false" text="{Weight}"/>
			</cells>
		</ColumnListItem>
	</items>
</Table>
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Apr 05, 2017 at 03:33 PM

    <Input enabled="false" text="{Action}"/>

    bind enabled to some field in your model,

    <Input enabled="{/FieldEditable}" text="{Action}"/>

    in your event handler

    YOURMODEL.setProperty("/FieldEditable",true);

    Add comment
    10|10000 characters needed characters exceeded