繁体   English   中英

如何在ExtJs的网格上显示行数?

[英]How to display the line count on a grid in ExtJs?

我正在开发一个ExtJs应用程序; 在此应用程序中,可以将新行动态添加到网格。 但是,我不知道在添加行时如何编号。 谁能为我提供一些见识?

检查文档中的RowNumberer类。

columns: [
    {xtype: 'rownumberer'},
    {text: "Company", flex: 1, sortable: true, dataIndex: 'company'},
    {text: "Price", width: 120, sortable: true, renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
    {text: "Change", width: 120, sortable: true, dataIndex: 'change'},
    {text: "% Change", width: 120, sortable: true, dataIndex: 'pctChange'},
    {text: "Last Updated", width: 120, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
]

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.grid.RowNumberer

暂无
暂无

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

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