0

一度に1つだけチェックできる2つのボタングループ(Extjs 4.1)があります。問題は、最初に(グリッドがロードされたとき)それらの1つをチェックしたいということです。コードは以下のとおりです。

{
    xtype : 'checkboxgroup',
    store : checked,
    columns : 3,
    vertical : false,
    singleSelect: true,
    items : [
        {
        xtype: 'button',
        text: 'name',
        width: 75,
        toggleGroup: 'mygroup',
        enableToggle: true,
        listeners: {
                click: function(th) {
                //this == the button, as we are in the local scope
                    checked = [1,0,0];
                }}
        }, {
        xtype: 'button',
        text: 'buyer_member_id',
        width:100,
        toggleGroup: 'mygroup',
        enableToggle: true,
        listeners: {
                click: function(th) {
                //this == the button, as we are in the local scope
                    checked = [0,1,0];
                }}
        }, {
        xtype: 'button',
        text: 'id',
        width: 50,
        toggleGroup: 'mygroup',
        enableToggle: true,
        listeners: {
                    click: function(th) {
                //this == the button, as we are in the local scope
                    checked = [0,0,1];
                }}
        }
    ]}

Sencha フォーラムでヘルプを見つけましたが、問題を解決できませんでした。

4

1 に答える 1

0

これは言葉です:

    pressed: true,

ボタンの設定手順に挿入します。

于 2013-10-02T09:56:51.423 に答える