[英]UI5 TreeTable scrolling to specified item in the model that binded to table programmatically
I am using UI5 TreeTable to render show the data and i am instantiating like this 我正在使用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>
But if I want to scroll to the specified row programmatically how can I achieve that? 但是,如果我想以编程方式滚动到指定的行,该如何实现呢?
您可以使用setFirstVisibleRow()
进行此操作,例如,将第一可见行设置为第十行
this.getView().byId("YourTable").setFirstVisibleRow(10)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.