PDA

View Full Version : [UNKNOWN][3.0.3/3.1] Ext.ux.grid.RowEditor



tobiu
31 Dec 2009, 5:28 AM
hi together,

i found a small bug in the example, tested only in ff3. if you watch the demo closely, you will find out, that the input-fields are 1px to wide. with many columns, it will get a mess.

fix:


verifyLayout: function(force){
if(this.el && (this.isVisible() || force === true)){
var row = this.grid.getView().getRow(this.rowIndex);
this.setSize(Ext.fly(row).getWidth(), Ext.fly(row).getHeight() + 9);
var cm = this.grid.colModel, fields = this.items.items;
for(var i = 0, len = cm.getColumnCount(); i < len; i++){
if(!cm.isHidden(i)){
var adjust = 0;
if(i === (len - 1)){
adjust += 3; // outer padding
} else{
// adjust += 1;
adjust += 2;
}
fields[i].show();
fields[i].setWidth(cm.getColumnWidth(i) - adjust);
} else{
fields[i].hide();
}
}
this.doLayout();
this.positionButtons();
}
}


kind regards,
tobiu