ext有Ext.grid.CheckboxSelectionModel() 可是却少了个disabled的属性? 找了很多地方没找到合适的方法去解决? ,直接用checkbox代替
?
columns:[
??? ??? ??? ??? ??? {//列表 header 头信息 new Ext.grid.RowNumberer(),
??? ??? ??? ??? ??? ??? header: '<input type="checkbox" onclick="selectAll(this)" name="selectAll" id="selectAll" style="width:13px; height:13px;"/>',
??? ??? ??? ??? ??? ??? dataIndex: 'check',
??? ??? ??? ??? ??? ??? width:30,
??? ??? ??? ??? ??? ??? sortable: false,
??? ??? ??? ??? ??? ??? renderer:function(v, cellmeta, record){
??? ??? ??? ??? ??? ??? ??? return record.get('Addr')!=''?'<input type="checkbox" onclick="selectSingle(this)" name="each" rel="each" style="width:13px; height:13px;"/>':'<input type="checkbox" disabled= "disabled" rel="each" style="width:13px; height:13px;"/> ';
??? ??? ??? ??? ??? ??? }
??? ??? ??? ??? ??? }
]
?
?
?
selectAll = function(self){
??? ??? ??? var checkEl = Ext.get('wrap').query("[rel='each']");
??? ??? ??? for(var i = 0,j = checkEl.length; i < j;i++){
??? ??? ??? ??? if(checkEl[i].name == 'each'){
??? ??? ??? ??? ??? checkEl[i].checked = self.checked;
??? ??? ??? ??? ??? Ext.getCmp('invoice-Enroll').store.getAt(i).data.check = self.checked ? 1 : 0;
??? ??? ??? ??? }
??? ??? ??? }
??? ??? }