0

JqG​​ridを使用して、ユーザーがチェック/チェックを外すたびにデータベースデータをajaxリクエストで更新するチェックボックスフィールドを実装しようとしています。これは私の失敗した試みです:

{name:'fastpass',index:'fastpass',width:20,editable:true, edittype:'checkbox', editoptions:{
value:"True:False",
dataEvents:[{
type:'click',fn:function(e){
alert();
}
}]
}, formatter:"checkbox", formatoptions:{disabled:false} }

しかし、アラート()を取得しないために何が間違っていたのか理解できないようです。コードの何が問題になっていますか?

4

1 に答える 1

0

これを試して

            { name: 'fastpass',
                index: 'fastpass',
                width: 20,
                editable: true,
                edittype: 'checkbox', 
                editoptions: {
                    value: "True:False",
                    dataEvents: [{
                        type: 'click', fn: function (e) {
                            alert();
                        }
                    }],
                    formatter: "checkbox", 
                },
                formatoptions: { disabled: false }
            }
于 2013-08-05T10:45:54.133 に答える