Sencha treepanel에서 체크된 row만 가져오기

2024. 12. 21. 23:01Javascript/Sencha

test 컬럼이 체크된 row만 가져오기

var treePanel = this.up('treepanel'); // Get the tree panel
var checkedRows = [];

treePanel.getStore().each(function (record) {
    if (record.get('test')) { // Check if the 'test' column is checked
        checkedRows.push(record); // Add the record to the array
    }
});

// Now 'checkedRows' contains all the checked rows.
console.log(checkedRows);