DataTable表构建后如何修改
我想在 ajax 查询完成时修改 YUI DataTable。例如,我有 4 个 ajax 查询,查询需要 1 秒到 10 秒才能完成的事情。我想在1s查询完成时开始构建表,并在每次ajax查询完成时再次修改表。一般来说,有推荐的方法吗?
特别是,我想更改列的格式以显示处理行时发生的任何潜在错误。但是,错误处理速度很慢,因此先显示数据然后再添加错误会很有帮助。
非常感谢您的帮助!
贾森
I would like to modify a YUI DataTable as ajax queries get completed. So for example, i have 4 ajax queries querying for things which takes anywhere from 1s to 10s to complete. I would like to start constructing the table when the 1s query finish, and modify the table again every time a ajax query finishes. Is there a recommended way of doing this in general?
In particular, i would like to change how the column is formatted to display any potential errors that occurs while processing a row. However, the error processes slowly, so it would be beneficial to display the data first and then add on the errors later.
Thanks a lot for any help!
Jason
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我假设您的多个请求正在聚合列数据。我还假设该表是静态的(不是服务器端分页或排序)。
前面的伪代码)
因此每个附加服务将在记录级别添加数据,然后更新完整的表 UI。
华泰
I'm presuming your multiple requests are aggregating column data. I'm also assuming the table is static (not server side paging or sorting).
(pseudo-code ahead)
So each additional service will add data at the Record level, then the full table UI will be updated.
HTH