简体   繁体   English

通过索引而不是位置获取列宽

[英]Get the column width by index instead of position

I would like to get the column width by index instead of position.我想通过索引而不是位置来获取列宽。

To get the width of columns currently viewed I can use this.要获得当前查看的列的宽度,我可以使用它。

bodyLayer.getColumnWidthByPosition(columnPosition)

Is it possible to get the column width by index instead?是否可以通过索引获取列宽? This would allow me to get the column widths of columns that aren't within the viewport.这将允许我获得不在视口内的列的列宽。 I would like to loop through every column and get its width.我想遍历每一列并获得它的宽度。

This is only possible if you operate on a deeper layer like the DataLayer.只有在像 DataLayer 这样的更深层次上操作时,这才有可能。 The ViewportLayer will not return you any width of a column that is currently not visible. ViewportLayer 不会返回当前不可见的列的任何宽度。 That would violate the design of the ViewportLayer.这将违反 ViewportLayer 的设计。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM