PDA

View Full Version : [OPEN-1352] Ext.grid.GridView -> resolveCell()



tobiu
21 Oct 2010, 5:59 AM
hi team,

if i get this code (the part in red) right, resolveCell looks if a column is hidden and in case it is, tries to find a column with a higher index that is visible instead. if there is none, you have a problem. also you might not get the cell you want to get :)


kind regards
tobiu



resolveCell : function(row, col, hscroll) {
if (!Ext.isNumber(row)) {
row = row.rowIndex;
}

if (!this.ds) {
return null;
}

if (row < 0 || row >= this.ds.getCount()) {
return null;
}
col = (col !== undefined ? col : 0);

var rowEl = this.getRow(row),
colModel = this.cm,
colCount = colModel.getColumnCount(),
cellEl;

if (!(hscroll === false && col === 0)) {
while (col < colCount && colModel.isHidden(col)) {
col++;
}

cellEl = this.getCell(row, col);
}

return {row: rowEl, cell: cellEl};
}

steffenk
21 Oct 2010, 6:04 AM
this code doesn't seem to work (from reading)
What happen if i call it with col=0 and this col is hidden?