我想切换一下我的控件的可编辑性。*属性的元数据为sap:updatable = true
editTogglable="true"如果我一开始
editable="true"表字段是可编辑的
<smartTable:SmartTable id="ReportSmartTable" entitySet="StudentHeaderSet" tableBindingPath="/StudentHeaderSet" tableType="Table"
header="Artikel" showRowCount="true" enableAutoBinding="true" class="sapUiResponsiveContentPadding" showFullScreenButton="true"
smartFilterId="smartFilterBar" useVariantManagement="false" persistencyKey="SmartTableUEreport" useTablePersonalisation="true"
editTogglable="true" editable="true" beforeRebindTable="onBeforeRebindTable">如果我想设置可编辑的false字段(在运行时),这些代码段都不会影响可编辑字段。这些田地仍然是可供借鉴的。
this._getSmartTableId().setEditable(false);
//this._getSmartTableId().mProperties.editable = false;问候
发布于 2019-05-16 09:59:31
只需使用模型处理可编辑字段,就可以在前端切换。例如:
<ui:columns>
<ui:Column visible="true" hAlign="Left" sortProperty="PropertyName" filterProperty="PropertyName" customData:p13nData='\{"columnKey": "PropertyName", "leadingProperty":"PropertyName", "type":"string"}'>
<Label text="Title"/>
<ui:template>
<Input editable="{worklistView>/editable}" value="{ path: 'PropertyName' }" />
</ui:template>
</ui:Column>
</ui:columns>发布于 2019-05-15 16:12:47
editTogglable属性仅适用于SmartField控件,如文档所示:
https://sapui5.hana.ondemand.com/#/api/sap.ui.comp.smarttable.SmartTable
https://stackoverflow.com/questions/56145379
复制相似问题