Javascript/Sencha(120)
-
Sencha grid checkcolumn 체크된 row 가져오기
const store = this.up('grid').getStore();const selection = store.getRange().filter(record => record.get('selected') === true);const data = selection.map(record => record.getData());console.log(data);
2025.01.06 -
Sencha grid 기본 체크박스 정보 가져오기
const grid = this.up('grid');const selection = grid.getSelectionModel().getSelection();const data = selection.map(record => record.getData());console.log(data);
2025.01.06 -
Sencha 이미지 사이즈 변경 후 업로드하기
이미지 사이즈 변경 및 rotation 처리function resizeImage(file, callback) { const reader = new FileReader(); reader.onload = function(e) { const img = new Image(); img.src = e.target.result; img.onload = function() { let width = img.width; let height = img.height; let orientation = -1; EXIF.getData(img, function() { const exifOrientation = EXIF.getTag(this, "Orientation"); if(exifOrient..
2025.01.06 -
Sencha grid editing 가능하도록 처리
Row editingselType: 'rowmodel', // Enables row selection for editingplugins: { ptype: 'rowediting', // Enables row editing plugin clicksToEdit: 2 // Double-click to edit},Cell editingselType: 'cellmodel', // Enables cell selection for editingplugins: { ptype: 'cellediting', clicksToEdit: 1 // Single-click to edit},selType: 'cellmodel' 과 selModel: { type: 'checkboxmodel' }은 같이 ..
2025.01.04 -
Sencha grid 특정 컬럼만 commit해야 하는 경우
selection.commit(false, ['age']);처럼 원하는 컬러만 commit 처리함Ext.create('Ext.grid.Panel', { title: 'Editable Grid Example', renderTo: Ext.getBody(), width: 600, height: 400, store: { fields: ['id', 'name', 'age'], data: [ { id: 1, name: 'John Doe', age: 30 }, { id: 2, name: 'Jane Doe', age: 25 } ] }, columns: [ { text: 'ID', dataInd..
2024.12.28 -
Sencha grid 데이터 초기화 하기
const grid = Ext.ComponentQuery.query('grid')[0]; // Get the grid componentgrid.getStore().removeAll(); // Clear all data
2024.12.27