YUI 3.5计算列和排序

时间:2012-05-19 08:15:04

标签: javascript yui

我正在学习YUI 3.5,我使用格式化程序计算了VAT和Total列。 (见下面的jsfiddle)。

然而,对它们进行排序不起作用。我想因为我正在为数据创建一个可视化表示,但它下面没有底层数据。创建计算列的正确方法是什么,以便排序有效?

http://jsfiddle.net/zWk54/1/

1 个答案:

答案 0 :(得分:0)

我收到了关于IRC freenode #yui频道

的回复
<Tew> stivlo - http://jsfiddle.net/zWk54/2/  is how I'd do it.
<Tew> (using getter in recordType; just in case someone wants to comment on 
      that but is not tempted to click)
<Tew> stivlo - the examples are linked on top right-hand side,
      http://yuilibrary.com/yui/docs/datatable/datatable-recordtype.html 
     (Sortable generated columns).  In case you have some comment on 
     documentation, we(?)'d appreciate it (it's "that week", it seems).

链接:http://jsfiddle.net/zWk54/2/和        http://yuilibrary.com/yui/docs/datatable/datatable-recordtype.html