Sapui5 切换smarttable的可编辑性

Sapui5 切换smarttable的可编辑性,sapui5,Sapui5,我想在smarttable中切换控件的可编辑性。 *属性的元数据为sap:updateable=true editTogglable="true" 按钮出现,但不起作用。表格字段不可编辑 如果我最初设定 editable="true" 表格字段是可编辑的 <smartTable:SmartTable id="ReportSmartTable" entitySet="StudentHeaderSet" tableBindingPath="/StudentHeaderSet" tabl

我想在smarttable中切换控件的可编辑性。 *属性的元数据为sap:updateable=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">

正如文档所示,
edittoggable
属性仅适用于SmartField控件:


只需使用模型处理可编辑字段,即可在前端进行切换。例如:

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

    
        
        
            
        
    

谢谢你的提示。我尝试在表中使用SmartField控件,但没有按预期工作
<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>