Extjs中怎么获取grid控件中的行对象 Extjs中怎么获取grid控件中的行对象 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 就是将整行灰掉,看上去为不可用状态。你昨天给我的代码不管用,因为我的表格选择模型不是rowSelectionModelExt.override(Ext.grid.RowSelectionModel, { selectRow: function(index, keepExisting, preventViewNotify) { if (this.isLocked() || (index < 0 || index >= this.grid.store.getCount()) || (keepExisting && this.isSelected(index)) || (Number(this.grid.store.getAt(index).get("Flag")) === 0)) {//给一个标识来确定哪一行不能选择 return; } var r = this.grid.store.getAt(index); if (r && this.fireEvent('beforerowselect', this, index, keepExisting, r) !== false) { if (!keepExisting || this.singleSelect) { this.clearSelections(); } this.selections.add(r); this.last = this.lastActive = index; if (!preventViewNotify) { this.grid.getView().onRowSelect(index); } this.fireEvent('rowselect', this, index, r); this.fireEvent('selectionchange', this); } }}); grid用这个模型var CheckBoxColumn = new Ext.grid.CheckboxSelectionModel(); 我没用这个模型,用的默认的列模型。前面的复选框是我组件写的css脚本控件的,因为我的复选框选中状态用3种形式,Ext的CheckboxSelectionModel满足不了我的要求,所以自己写了个...... javascript执行顺序问题 程序暂停一段时间问题 分数不多了,倾家荡产求助。高手进来帮忙下~~急! js iframe问题 高手进 javascript 获取 Activex传出的VARIANT 类型 JS怎么调用JAVA类里面的方法。。在线 急等。。马上给分。。 有关监视按键的问题,我是个菜鸟希望高手们帮帮忙!! swfobject怎么实现swf视频文件的连续播放 ext js 弹窗思路 js dom实现添加好友并可以移动数据 为什么在div上使用滚轮的时候页面不滚动? Ext.getBody()问题
你昨天给我的代码不管用,因为我的表格选择模型不是rowSelectionModel
Ext.override(Ext.grid.RowSelectionModel, {
selectRow: function(index, keepExisting, preventViewNotify) {
if (this.isLocked() || (index < 0 || index >= this.grid.store.getCount()) || (keepExisting && this.isSelected(index)) || (Number(this.grid.store.getAt(index).get("Flag")) === 0)) {//给一个标识来确定哪一行不能选择
return;
}
var r = this.grid.store.getAt(index);
if (r && this.fireEvent('beforerowselect', this, index, keepExisting, r) !== false) {
if (!keepExisting || this.singleSelect) {
this.clearSelections();
}
this.selections.add(r);
this.last = this.lastActive = index;
if (!preventViewNotify) {
this.grid.getView().onRowSelect(index);
}
this.fireEvent('rowselect', this, index, r);
this.fireEvent('selectionchange', this);
} }
});
var CheckBoxColumn = new Ext.grid.CheckboxSelectionModel();
我没用这个模型,用的默认的列模型。前面的复选框是我组件写的css脚本控件的,因为我的复选框选中状态用3种形式,Ext的CheckboxSelectionModel满足不了我的要求,所以自己写了个......