Skip to Content
0

Enable All input fields in SAPUI5 Table

Apr 05, 2017 at 03:13 PM

51

avatar image
Former Member

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>
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Jun Wu Apr 05, 2017 at 03:33 PM
1

<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);

Share
10 |10000 characters needed characters left characters exceeded