/**
* get the cell by the id of the widget that column bounded.
* @param wid the id of the bounded widget.
*/
me.getCellById = function (wid){
var okCell;
me.foreachCell(function (cell){
if(cell.cellWidget && cell.cellWidget.id==wid){
okCell = cell;
}
});
return okCell;
};
me.foreachCell = function(fn){
var cells = me.getAllCells();
for(var n = 0,len = cells.length;n<len;n++){
(fn)(cells[n]);
}
};
把函数作为参数传递给函数,实现查找功能
最新推荐文章于 2020-02-21 20:07:50 发布