1.点击"取数";
2.修改"运费",观察小计变化;
3.点右键选择 "以树方式展示";
4.点击标题"客户号"以重新排序;
5.将"国家"加入多重排序;
6.切换回列表方式展示;
7.将 "客户号" 列拖到 "国家" 右侧;
8.在排序区交换"国家"和"客户"位置;
填入的数据(相对URL):



1.上面的Treelist的中数据和最前面的demo页("感受Treelist"、"以Tree展现")是一致的;
2.该XML描述文件只是多了几个表达式, 就实现了分类汇总;
3.查看XML描述文件
<?xml version="1.0" encoding="utf-8"?>
<TreeList>
<Properties editable="true" sort="country,shipcity" subtotalFontIndex="1" subtotalBgColor="#d3d3d3"/>
<Fonts>
 <Font/>
 <Font faceName="Verdana" weight="700"/>
</Fonts>
<Cols>
 <Col name="Country"      editAble="false" width="100" subtotalExpress="='共'+@rows+'行'" subtotalAlign="center">国家</Col>
 <Col name="OrderID"      editAble="false"  width="70" align="center">订单号</Col>
 <Col name="CustomerID"   editAble="false" width="70">客户号</Col>
 <Col name="OrderDate"    editAble="false" width="90" datatype="date">销售日期</Col>
 <Col name="RequiredDate" editAble="false" width="90" datatype="date">接单日期</Col>
 <Col name="Freight"      width="230" datatype="double" decimal="2" subtotalExpress="='小计: ' +@sum+ ', 均价: ' +@ave">运费</Col>
 <Col name="ShipName"     editAble="false" width="180">船名</Col>
 <Col name="ShipCity"     editAble="false" width="130" subtotalExpress="='共'+@rows+'行'" subtotalAlign="center">城市</Col>
 <Col name="ShipAddress"  editAble="false" width="280">地址</Col>
</Cols>
</TreeList>
分类汇总表达式在第9、14、16行中.
这功能太强了吧!