Extjs3.4 grid中添加一列复选框

本文介绍如何利用ExtJS框架创建一个包含多个列并具备特定功能的网格面板。该网格面板实现了案件信息的展示,包括立案号、车牌号、出险日期等详细信息,并提供了搜索、编辑等功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  var sm = new Ext.grid.CheckboxSelectionModel();

    var cm = new Ext.grid.ColumnModel(
        [
            sm,
            new Ext.grid.RowNumberer(),
            {
                header: '立案号',
                dataIndex: 'AccidentNumber',
                width: 100
            }, {
                header: '车牌号',
                dataIndex: 'VehicleNumber',
                width: 100
            }, {
                header: '出险日期',
                dataIndex: 'AccidentDate',
                width: 100
            }, {
                header: '出险地点',
                dataIndex: 'AccidentPlace',
                width: 100
            }, {
                header: '司机',
                dataIndex: 'Driver',
                width: 100
            }, {
                header: '事故经过',
                dataIndex: 'AccidentProcess',
                width: 100
            }
        ]
    );

    var grid = new Ext.grid.GridPanel({
        store: store,
        trackMouseOver: false,
        disableSelection: true,
        autoHeight: true,
        autoWidth: true,
        autoScroll: true,
        viewConfig: {
            forceFit: true
        },
        loadMask: true,
        stripeRows: true,
        columnLines: true,
        sm: sm,
        cm: cm,

        tbar: new Ext.Toolbar({
            enableOverflow: true,
            items: [searchAction, '-', editAction, '-', MergeAction, '-', AutoMergeAction]
        }),

        bbar: new Ext.PagingToolbar({
            pageSize: 20,
            store: store,
            displayInfo: true
        })
    });

  

转载于:https://www.cnblogs.com/sunshineground/p/3833980.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值