是否可以动态更改 YUI 分页数据表中的页面大小?
我有一个已分页的 YUI 数据表。数据表能够使用的高度可以改变。我想要发生的是,当大小发生变化时(我已经掌握了),我可以采用新的高度并找到页面中需要容纳多少行,然后将数据表或其分页器更改为有那么多行。
YUI Datables 是否可以做到这一点?如果可以,是否有相关示例或文档?
I have a YUI Datatable which is paginated. The height the datatable is able to use can change. What I want to happen is that when there is a size change (which I already have a handle on), I can take the new height and find how many rows are going to fit in a page, then change the datatable or it's paginator to have that number of rows.
Is this something that is possible with YUI Datables, if so is there examples or documentation about it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看起来,如果您可以获得对 YAHOO.widget.Paginator 实例的引用,则可以调用:
其中静默选项允许设置是否应发送changeRequest 事件。如果您希望重绘数据表,请将其设置为 false。
参考:非常有用的YUI官方文档
It appears that if you can get a reference to the YAHOO.widget.Paginator instance, you can call:
Where the silent option allows setting whether the changeRequest event should be sent. If you wish the datatable to redrawn, set this to false.
Reference: the very useful official YUI documentation