簡體   English   中英

如何獲取extjs網格的選定行值

[英]How to get selected row values of extjs grid

您好,我如何從該對象獲取值,請在此處輸入圖像描述 ,並將其推入一個空數組,這是代碼。 我不想使用路徑可能有一個函數可以獲取它們或另一個代碼Thx

var selectedRowIndexes = [];
        // returns an array of selected records
        var selectedBanners = grid.getSelectionModel().getSelection(); 
        console.log(selectedBanners);
        Ext.iterate(selectedBanners, function(banner, data) {
            // push the row indexes into your array
        selectedRowIndexes.push(grid.getStore().indexOf(banner)); 
        });

getSelection為您提供了一組選定的記錄。

對於每條記錄,您可以使用以下方法提取字段:

record.get('theField');

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM