sencha(124)
-
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 -
Sencha button 이벤트 추가하기
{ xtype: 'button', text: 'Click Me', handler: function () { Ext.Msg.alert('Button Clicked', 'You clicked the button!'); }}
2024.12.19 -
Sencha container 오른쪽 정렬하기
{ xtype: 'container', layout: { type: 'hbox', // Horizontal layout pack: 'end', // Aligns child items to the right }, items: [ { xtype: 'button', text: 'Button 1' }, { xtype: 'button', text: 'Button 2' }, ],}
2024.12.19 -
Sencha grid 선택된 데이터 삭제 처리
const grid = btn.up('grid');const store = grid.getStore();const selection = grid.getSelectionModel().getSelection();if (selection.length > 0) {Ext.Array.each(selection, function (record) { if (record.phantom) { // Directly remove newly inserted rows store.remove(record); } else { // Flag existing rows as deleted record.set('flagDeleted', true); }});
2024.12.18 -
Sencha grid 데이터 합치
// Get new and updated recordsconst newRows = store.getNewRecords();const updatedRows = store.getUpdatedRecords();// Combine newRows and updatedRows into a single arrayconst combinedRows = Ext.Array.merge(newRows, updatedRows);
2024.12.18 -
Sencha grid 데이터 가져오기
신규 rowsconst grid = btn.up('grid');const = grid.getStore();const newRecords = store.getNewRecords();수정된 rowsconst grid = btn.up('grid');const store = grid.getStore();const updatedRecords = store.getUpdatedRecords(); 신규 + 수정 rowsconst grid = btn.up('grid');const store = grid.getStore();const modifiedRecords = store.getModifiedRecords();선택된 rowsconst grid = btn.up('grid');const store = grid.getSto..
2024.12.18