분류 전체보기(865)
-
Javascript 문자에서 접두사 검색
var str = "extTreePanel";if (str.startsWith('ext')) { console.log("The string starts with 'ext'.");} else { console.log("The string does not start with 'ext'.");}
2024.12.05 -
Sencha Object 접근하기
ComponentQuery 사용Ext.define('MyApp.controller.MainController', { extend: 'Ext.app.ViewController', alias: 'controller.main', getTreePanelInfo: function () { // Use ComponentQuery to find the TreePanel var treePanel = Ext.ComponentQuery.query('treepanel')[0]; // Adjust the selector if needed if (treePanel) { console.log('TreePanel Title:', treePanel.getTit..
2024.12.05 -
Sencha treepanel에서 선택된 row 정보 가져오기
treepanel에서 정보를 가져옴// Assuming 'treePanel' is the reference to your TreePanel instancevar selectedNodes = treePanel.getSelectionModel().getSelection();// Iterate through the selected nodesselectedNodes.forEach(function(node) { console.log('Selected Node:', node.get('text')); // Replace 'text' with the field name you want});Ext.create('Ext.tree.Panel', { title: 'Sample TreePanel', width:..
2024.12.05 -
Sencha Grid의 체크박스 사용하기
Grid에 있는 체크박스 사용: 셀만 선택이되고, 체크박스에 체크를 해야 row가 선택됨 selModel: { type: 'checkboxmodel', checkOnly: true, // Only allow selection via checkbox},Grid에 있는 체크박스 사용: Row를 선택하면, 체크박스가 체크됨selType: 'checkboxmodel',체크박스 선택 옵션SINGLE: 한개만 선택됨MULTI: 여러개 선택됨(단, shift 키를 같이 눌러야 함)SIMPLE: 여러개 선택됨(shift키를 안눌러도 됨) selModel: { type: 'checkboxmodel', // Enable checkbox selection mode: 'MULTI', ..
2024.12.05 -
Sencha TreePanel 사용시 주의사항
store에 autoload:true를 설정하면 client에서 설정한 데이터값이 무시됨빼거나 false로 설정해야 함Ext.onReady(function () { // Define the TreeStore with static local data const store = Ext.create('Ext.data.TreeStore', { fields: ['id', 'name', 'location'], // Define the fields for the nodes root: { expanded: true, // Expand the root node by default text: 'Root Node', // Root node's text..
2024.12.01 -
Sencha Uncaught Error: [Ext.create]
데이터를 정의할때, ':' 대신 '='를 사용했을 때 발생했었음 { id: 'Child Node 1', name: '1', location= '', leaf: true }, { id: 'Child Node 2', name: '2', location= '', leaf: true },
2024.12.01