【问题标题】:Select multiple rows in a SmartTable在 SmartTable 中选择多行
【发布时间】:2019-03-26 07:45:58
【问题描述】:

我找不到任何可以帮助在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>

【问题讨论】:

    标签: sapui5


    【解决方案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>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-04
      • 2016-03-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多