在SmartTable中选择多行

时间:2019-03-26 07:45:58

标签: sapui5

我找不到任何有助于多选SmartTable中行的属性。

我使用简单的表。那里的属性mode="MultiSelect"解决了这个问题,但是在SmartTable中,这不起作用。

请向我建议一个属性,该属性可用于选择SmartTable

中的多行
<mvc:View xmlns="sap.m" xmlns:mvc="sap.ui.core.mvc" controllerName="Workspace.controller.SmartField"
xmlns:smartFilterBar="sap.ui.comp.smartfilterbar" xmlns:smartTable="sap.ui.comp.smarttable">
    <smartFilterBar:SmartFilterBar id="smartFilterBar" entitySet="PLANT" persistencyKey="SmartFilter_Explored">
        <smartFilterBar:controlConfiguration>
            <smartFilterBar:ControlConfiguration key="PLANTID" visibleInAdvancedArea="true" preventInitialDataFetchInValueHelpDialog="false"> </smartFilterBar:ControlConfiguration>
            <smartFilterBar:ControlConfiguration key="STATUS" visibleInAdvancedArea="true" preventInitialDataFetchInValueHelpDialog="false"> </smartFilterBar:ControlConfiguration>
        </smartFilterBar:controlConfiguration>
    </smartFilterBar:SmartFilterBar>
    <OverflowToolbar design="Transparent">
        <ToolbarSpacer/>
        <OverflowToolbarButton icon="sap-icon://add"  text="Add" press="AddRow"/>
        <OverflowToolbarButton icon="sap-icon://delete" text="Delete" press="Delete"/>
        <OverflowToolbarButton icon="sap-icon://drop-down-list" text="Filter"/>
    </OverflowToolbar>
    <smartTable:SmartTable id="tableplant" smartFilterId="smartFilterBar" tableType="ResponsiveTable" editable="false" entitySet="PLANT"
      initiallyVisibleFields="PLANTID,PTYPE,DESCRIPTION,TYPE,STATUS,ASSIGNED,ATTACHMENT" useVariantManagement="false"  demandPopin="true" 
      useTablePersonalisation="true" header="Products" showRowCount="true" useExportToExcel="false" enableAutoBinding="true"></smartTable:SmartTable>
</mvc:View>

1 个答案:

答案 0 :(得分:1)

如果要使用多选功能,可以在智能表中集成sap.m.Table:

<smartTable:SmartTable id="tableplant" smartFilterId="smartFilterBar" tableType="ResponsiveTable" editable="false" entitySet="PLANT"
      initiallyVisibleFields="PLANTID,PTYPE,DESCRIPTION,TYPE,STATUS,ASSIGNED,ATTACHMENT" useVariantManagement="false"  demandPopin="true" 
      useTablePersonalisation="true" header="Products" showRowCount="true" useExportToExcel="false" enableAutoBinding="true">

<!--  Table integration -->
    <Table mode="MultiSelect" growingThreshold="100" growing="true" 
     growingScrollToLoad="true">
        <columns>
        ...
        </columns>
        <items>
        ...
        </items>
     </Table>
<!--  EndTable integration -->

</smartTable:SmartTable>