ExtJS4 多行工具栏

	   ExtJS在javascript框架里,算是曲线比较高的。可能E文能力强点的,能够很好理解文档,但我认为这个只是一个方面,不是最重要的方面。
	软件的学习是这个世界最好的学习模式,你能够快速用一个小小demo去验证,你想到的,你猜到的。所以这个行业也是自学成才最多的行业,没有之一。大多时候属性方法,我们不要理解的时候,都需要例子去验证,对比。
	ExtJS添加多行工具栏
Ext.onReady(function () {
    Ext.create('Ext.data.Store', {
        storeId: 'simpsonsStore',
        fields: ['name', 'email', 'phone'],
        data: {
            'items': [{
                'name': 'Lisa',
                    "email": "lisa@simpsons.com",
                    "phone": "555-111-1224"
            }, {
                'name': 'Bart',
                    "email": "bart@simpsons.com",
                    "phone": "555-222-1234"
            }, {
                'name': 'Homer',
                    "email": "home@simpsons.com",
                    "phone": "555-222-1244"
            }, {
                'name': 'Marge',
                    "email": "marge@simpsons.com",
                    "phone": "555-222-1254"
            }]
        },
        proxy: {
            type: 'memory',
            reader: {
                type: 'json',
                root: 'items'
            }
        }
    });

    Ext.create('Ext.grid.Panel', {
        title: 'Simpsons',
        store: Ext.data.StoreManager.lookup('simpsonsStore'),
        columns: [{
            text: 'Name',
            dataIndex: 'name'
        }, {
            text: 'Email',
            dataIndex: 'email',
            flex: 1
        }, {
            text: 'Phone',
            dataIndex: 'phone'
        }],
        height: 400,
        width: 500,
        dockedItems: [{ //这里开始
            xtype: 'toolbar',
            dock: 'top',
            items: [{
                xtype: 'textfield',
                id: 'gid',
                name: 'findstr',
                maxLength: 10,
                labelWidth: 35,
                width: 120,
                fieldLabel: 'Name'
            }, {
                xtype: 'textfield',
                id: 'gname',
                name: 'findstr',
                maxLength: 10,
                labelWidth: 35,
                fieldLabel: 'Phone'
            }]
        }, {
            xtype: 'toolbar',
            dock: 'top',
            items: ['->', {
                xtype: 'button',
                text: '查询',
                handler: function () {

                }
            }, {
                xtype: 'button',
                text: '重置',
                handler: function () {

                }
            }]

        }],


        renderTo: Ext.getBody()
    });

});
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值