Grid(22)
-
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 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