treepanel(11)
-
Sencha treepanel에서 체크된 row만 가져오기
test 컬럼이 체크된 row만 가져오기var treePanel = this.up('treepanel'); // Get the tree panelvar 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);
2024.12.21 -
Sencha treepanel view에서 모든 row 정보 가져오기
getNodes() 사용var tree = Ext.getCmp('treePanelId'); // Replace with your TreePanel IDvar view = tree.getView();var rows = view.getNodes(); // Get all rendered rows (DOM elements)console.log(rows);
2024.12.21 -
Sencha treepanel의 모든 row 가져오기
getRootNode() 사용var tree = Ext.getCmp('treePanelId'); // Replace with your TreePanel IDvar store = tree.getStore();var allNodes = [];store.getRootNode().cascadeBy(function(node) { allNodes.push(node);});// Output all nodesconsole.log(allNodes);
2024.12.21 -
Sencha treepanel 체크박스 체크하면 css 적용하기
Ext.fly().toggle.Cls 사용{ xtype: 'checkcolumn', dataIndex: 'check', width: 50, listeners: { checkchange: function (column, rowIndex, checked, record) { record.commit(); // Commit changes to reflect visually // Apply a CSS class to visually indicate deletion const view = column.up('treepanel').getView(); const rowNode = view.ge..
2024.12.21 -
Sencah treepanel에서 1 depth까지만 펼치기
getPath()를 통해서 원하는 depth를 설정하고, expand() 처리를 함success: function (response) { const data = Ext.decode(response.responseText); const treeData = buildTree(data); store.setRoot({ id: 0, expanded: true, children: treeData }); const rootNode = store.getRootNode(); const treeGrid = Ext.ComponentQuery.query('#location')[0]; treeGrid.getSelectionModel().select(rootNode); //treeGrid.expandAll(); rootNo..
2024.12.08 -
Sencha treepanel drag&drop 적용
Ext.application({ name: 'TreeMultiplePluginsApp', launch: function () { Ext.create('Ext.container.Viewport', { layout: 'fit', items: [ { xtype: 'treepanel', title: 'TreePanel with Multiple Plugins', rootVisible: false, store: Ext.create('Ext.data.TreeStore', { ..
2024.12.05