> 文章列表 > [Ext JS]3.6 Ext JS 表格(Grid)概览

[Ext JS]3.6 Ext JS 表格(Grid)概览

[Ext JS]3.6 Ext JS 表格(Grid)概览

Grid, 翻译过来是网格, 也就是表格

Grid 的基本构成

  • 面板Ext.grid.Panel
  • 表格视图 :Ext.view.Table
    不直接使用, 通过面板的viewConfig配置项进行配置。比如可以用来配置表格中行是否跳色显示
  • 列: Ext.grid.column.Column。 表格中的列定义
  • store , 表格的数据

示例代码:

        Ext.create(\'Ext.grid.Panel\', {columns: [{text: \'ID\',dataIndex: \'id\'}, {text: \'Name\',dataIndex: \'name\'}],viewConfig: {stripeRows: false // 禁用相邻行的颜色调色},store: [{\"id\": \"user-001\",\"name\": \"曹操\"},{\"id\": \"user-002\",\"name\": \"刘备\"},{\"id\": \"user-00