Javascript/Sencha(117)
-
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 -
Sencha grid에 선택된 rows를 서버에 전송하기
에러 발생{ text: '삭제', handler: function() { const grid = this.up('grid'); const selection = grid.getSelectionModel().getSelection(); Ext.Ajax.request({ url: '/location/delete_image', params: { _csrf: document.getElementById('_csrf').innerText, }, method: 'POST', jsonData: { data: selectio..
2024.12.27 -
Sencha grid에 이미지 보여주기
Ext.create('Ext.grid.Panel', { title: 'Image Grid Example', renderTo: Ext.getBody(), width: 600, height: 400, store: { fields: ['name', 'imageUrl'], data: [ { name: 'Image 1', imageUrl: '/images/sample1.jpg' }, { name: 'Image 2', imageUrl: '/images/sample2.jpg' }, { name: 'Image 3', imageUrl: '/images/sample3.jpg' } ] }, ..
2024.12.27 -
Sencha form에서 결과값 가져오기
failure: function(form, action) { let result = {}; try { result = Ext.decode(action.response.responseText); // Attempt JSON parsing } catch (e) { result.message = 'Invalid server response'; } console.log(result); Ext.Msg.alert('Failure', result.message || 'File upload failed.');}
2024.12.26