2

グリッド パネルでチェック ボックス モデルを使用しました。チェックボックスをオンにすると、チェックされた列の値になります。今私が必要としているのは、チェックを外したときに、同じ未チェックの値を取得する必要があることです。

var selModel = Ext.create('Ext.selection.CheckboxModel', {
    checkOnly: true,
    listeners: {
        selectionchange: function(model, records) {
            if (records[0]) {
                id = records[0].get('id');
                alert(id);
            }
        }
    }
});

前もって感謝します。

よろしく、

リヤズ

4

1 に答える 1

1

これが答えです:

var selModel = Ext.create('Ext.selection.CheckboxModel', {
    checkOnly: true,
    listeners: {
        deselect: function(model, record, index) {
            id = record.get('id');
            alert(id);
        },
        select: function(model, record, index) {
            id = record.get('id');
            alert(id);
        }
    }
})
于 2011-07-16T11:23:31.453 に答える