Extjs 复选框列:区分单击复选框和字段的其余部分

Extjs checkbox column: make difference between click on checkbox and the rest of the field

本文关键字:复选框 字段 余部 单击 Extjs      更新时间:2023-09-26

我有一个带有复选框列的网格,一切正常,但我想在单击复选框本身和单击同一字段中的复选框旁边之间采取不同的操作。 这在 ExtJs 中可行吗?我使用的是 3.3.1 版,但我想另一个版本的示例会让我入门。

var checkColumn = new Ext.grid.CheckColumn({
    header: 'Checklist OK ?',
    dataIndex: 'checklist_ok',
    width: 20,
    align: 'center'
});
cmDiverse = new Ext.grid.ColumnModel({
    defaults: {
        "sortable": true,
        "menuDisabled": false,
        "align": "right"
    },
    store: storeDiverse,
    columns: [{
        "id": "id",
        "header": "id",
        "hidden": true,
        "dataIndex": "id",
        "width": 20
    },

检查列, ...

gridDiverse = new Ext.ux.grid.livegrid.EditorGridPanel({
    id: "gridDiverse",
    enableDragDrop: false,
    loadMask: true,
    clicksToEdit: 1,
    layout: 'anchor',
    cm: cmDiverse,
    ....

遗憾的是,您无法区分复选框内部和外部的单击,因为所有侦听器都在列上,而复选框只是列内文本的格式,而不是真正的元素。