开发者

How to list all cells in grid?

开发者 https://www.devze.com 2023-02-16 23:53 出处:网络
for example: for row in rows开发者_开发百科: for col in cols: print cell[row,col] Assuming you have an Ext.data.Store from your grid (or in general), you can interate through through it as follows:

for example:

for row in rows开发者_开发百科:

for col in cols:

 print cell[row,col]


Assuming you have an Ext.data.Store from your grid (or in general), you can interate through through it as follows:

var store = grid.getStore();

var records = store.getRange();

for(var i = 0; i < records.length; i++) {
    for(var index in records[i]) {
        if (records[i].hasOwnIndex(index)) {
            //not sure how you want to print this, so for now, print to console
            console.log(records[i][index])
        }
    }
}

...However, if you have an Ext.grid.GridPanel, I'm not sure why you would want to do this manually...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号