【问题标题】:UI5 TreeTable scrolling to specified item in the model that binded to table programmaticallyUI5 TreeTable滚动到模型中以编程方式绑定到表的指定项目
【发布时间】:2017-07-21 03:58:25
【问题描述】:

我正在使用 UI5 TreeTable 来渲染显示数据,我正在像这样实例化

    <table:TreeTable 
        visibleRowCountMode="Auto"
        selectionMode="Single"
        enableSelectAll="false"
        minAutoRowCount="-1"
        rowHeight="40" 
        columnHeaderHeight="40"
        height="100%"
        rows="{/rows}">
        <table:columns>
            <table:Column width="30%"  id="dataListColumn">
                //column template
            </table:Column>
            <table:Column  resizable="false" flexible="false">
                    //column template   
            </table:Column>
        </table:columns>
    </table:TreeTable>

但是如果我想以编程方式滚动到指定的行,我该如何实现呢?

【问题讨论】:

    标签: javascript jquery scrollbar sapui5 treetable


    【解决方案1】:

    您可以使用setFirstVisibleRow() 来执行此操作,例如将第一个可见行设置为第 10 行

    this.getView().byId("YourTable").setFirstVisibleRow(10)
    

    【讨论】:

      猜你喜欢
      • 2019-01-31
      • 2021-03-11
      • 2018-03-03
      • 2019-10-04
      • 1970-01-01
      • 2011-05-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多