PropertiesMethodsEventsConfig OptionsDirect Link

Class Ext.grid.GridPanel

Package: Ext.grid
Defined In: .js
Class:
Extends: Ext.Panel
基于Grid控件的一个面板组件,此类呈现了主要的接口。

用法:
var grid = new Ext.grid.GridPanel({
    store: new Ext.data.Store({
        reader: reader,
        data: xg.dummyData
    }),
    columns: [
        {id:'company', header: "Company", width: 200, sortable: true, dataIndex: 'company'},
        {header: "Price", width: 120, sortable: true, renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
        {header: "Change", width: 120, sortable: true, dataIndex: 'change'},
        {header: "% Change", width: 120, sortable: true, dataIndex: 'pctChange'},
        {header: "Last Updated", width: 135, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
    ],
    viewConfig: {
        forceFit: true
    },
    sm: new Ext.grid.RowSelectionModel({singleSelect:true}),
    width:600,
    height:300,
    frame:true,
    title:'Framed with Checkbox Selection and Horizontal Scrolling',
    iconCls:'icon-grid'
});
注意: 尽管本类是由基类继承而得到的,但是不支持基类的某些功能,不能做到好像Panel类那样的方法,如autoScroll、layout、items等

要访问GRID中的数据,就必须通过由#store Store封装的数据模型。参与#cellclick事件。

配置项

配置项 定义者

公告属性

属性 定义者

公共方法

方法 定义者

公告事件

这个类没公共的事件。