我有一个gridpanel包括日期和组合列jsfiddle
但我不想点击显示我的组合.我希望在没有点击的情况下显示我的组合,而不是隐藏在单元格中
和日期栏一样
我觉得好奇clicksToEdit: 0
但失败了
plugins: [
Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1
})
]
Run Code Online (Sandbox Code Playgroud)
怎么做,谢谢
我已经选择了一行,现在我想获得rowIndex
也许就像
grid.getSelectionModel().getSelection()[0].rowIndex
Run Code Online (Sandbox Code Playgroud)
但它没有定义.我怎么能得到它谢谢
我有一个像http://jsfiddle.net/bmbMy/的树面板 我尝试使用css更改默认图标(节点和叶子).但那不起作用.
.x-grid-row .x-grid-tree-node-expanded {
background: url('http://icons.iconarchive.com/icons/sekkyumu/developpers/16/Play-Green-Button-icon.png') no-repeat center center !important;
}
.x-grid-row .x-grid-tree-node-leaf {
background-image:url('http://icons.iconarchive.com/icons/graphicrating/koloria/16/Button-Play-Pause-icon.png');
}
Run Code Online (Sandbox Code Playgroud)
我怎么能这样做谢谢
我有一个像这样的组合
items: {
xtype: 'combo',
id: 'combo',
queryMode: 'local',
displayField: 'name',
valueField: 'id',
store: Ext.create('Ext.data.Store', {
fields: ['id', 'name', 'mydata'],
data: [
{'id': '1', 'name': 'John Smith', 'mydata': ["3", "4"]},
{'id': '2', 'name': 'Albert Einstein', 'mydata': ["1", "2"]}
]
}),
listeners: {
select: function( combo, records, eOpts ) {
alert(records[0].get('mydata')); // records is undefined
}
}
}
Run Code Online (Sandbox Code Playgroud)
但是当我使用时
var combo = Ext.getCmp('combo');
//combo.select("1");
combo.setValue("1");
combo.fireEvent('select');
Run Code Online (Sandbox Code Playgroud)
然后alert(records[0].get('mydata')); // records is undefined
失败.如何解决这个问题谢谢.
这是我的代码http://jsfiddle.net/LZ8XU/
我定义了一个treepanel
扩展extend: 'Ext.tree.Panel'
,它具有initComponent函数
Ext.define('Example', {
extend: 'Ext.tree.Panel',
title: 'Example',
useArrows:false,
rootVisible: false,
border: false,
initComponent: function () {
var store = Ext.create('Ext.data.TreeStore', {
fields: [
{name: 'id', type: 'string'},
{name: 'text', type: 'string'}
],
autoLoad : false, // not working
proxy: {
type: 'ajax',
url: 'data.php',
reader: {
type: 'json',
root: 'results'
}
}
});
this.store = store;
this.callParent(arguments);
}
});
Run Code Online (Sandbox Code Playgroud)
我尝试设置autoLoad: false
但是当我创建我的时候总是加载treepanel
当我尝试配置下面的代码存储然后autoLoad: false
工作但我的treepanel
后加载是空白
root: {
text: 'Ext JS', …
Run Code Online (Sandbox Code Playgroud) 我的extjs代码如http://www.objis.com/formationextjs/lib/extjs-4.0.0/docs/api/Ext.form.field.File.html
Ext.create('Ext.form.Panel', {
title: 'Upload a Photo',
width: 400,
bodyPadding: 10,
frame: true,
renderTo: Ext.getBody(),
items: [{
xtype: 'filefield',
name: 'photo',
fieldLabel: 'Photo',
labelWidth: 50,
msgTarget: 'side',
allowBlank: false,
anchor: '100%',
buttonText: 'Select Photo...'
}],
buttons: [{
text: 'Upload',
handler: function() {
var form = this.up('form').getForm();
if(form.isValid()){
form.submit({
url: 'photo-upload.php',
waitMsg: 'Uploading your photo...',
success: function(fp, o) {
Ext.Msg.alert('Success', 'Your photo "' + o.result.file + '" has been uploaded.');
}
});
}
}
}]
});
Run Code Online (Sandbox Code Playgroud)
我的photo-upload.php文件
echo "{success:true}";
Run Code Online (Sandbox Code Playgroud)
但是当成功 …
我正在使用xampp-win32-1.8.3-1-VC11-installer
,我通过删除启用php_mssql.dll
扩展php.ini
;
我复制php_mssql.dll
到xampp\php\ext
和ntwdblib.dll
到xampp\apache\bin
我在旧的xampp版本中得到了2个文件.
但是当我开始apache
使用xampp时,我得到了
如何解决这个问题
我的组合看起来像http://jsfiddle.net/Q5nNV/
一切都很好,但当我搜索(键入)一些文本,如asdf
组合框,然后单击清除按钮
这不是选择第一项,它看起来像
这是我的代码
var states = Ext.create('Ext.data.Store', {
fields: ['abbr', 'name'],
data : [
{"abbr":"AK", "name":""},
{"abbr":"AL", "name":"Alabama"},
{"abbr":"AZ", "name":"Arizona"}
]
});
// Create the combo box, attached to the states data store
var combo = Ext.create('Ext.form.ComboBox', {
fieldLabel: 'Choose State',
store: states,
triggerAction: 'all',
value: "AK",
queryMode: 'local',
displayField: 'name',
valueField: 'abbr',
trigger2Cls: 'x-form-clear-trigger',
onTrigger2Click: function (args) {
this.setValue("AK");
},
tpl: new Ext.XTemplate('<tpl for=".">' + '<li style="height:22px;" class="x-boundlist-item" role="option">' + '{name}' + '</li></tpl>'),
renderTo: Ext.getBody() …
Run Code Online (Sandbox Code Playgroud) 我在http://www.rahulsingla.com/blog/2012/03/extjs-3-enabling-multiple-file-uploads-using-textfield#comment-2097上看到了这个教程.
我尝试下面但我无法选择要上传的多个文件
items: [{
xtype: 'textfield',
name: 'name[]',
fieldLabel: 'Name',
inputType: 'file',
fieldLabel: 'Multiple file selection',
autoCreate: { tag: 'input', type: 'text', size: '20', autocomplete: 'off', multiple: 'multiple' }
}]
Run Code Online (Sandbox Code Playgroud)
这是我的代码http://jsfiddle.net/baKxc/
我该怎么做才能让这项工作谢谢.
编辑:
如果我在这篇文章中.它看起来很棒,但我无法在php服务器中获取文件.我该怎么做才能感谢
我使用extensible-1.5.1
和我运行应用程序
extensible-1.5.1/examples/calendar/TestApp/test-app.html
我尝试Event
通过textfield
在此表单中添加一个新的自定义窗口窗口.这是表单默认值
但我找不到要编辑的文件.
我认为extensible-1.5.1\src\calendar\form\EventWindow.js
.但当我删除src
文件夹然后项目仍在工作,没有任何改变?
怎么做谢谢
编辑
我发现在extensible-all-debug.js
文件中.但那个文件真的很复杂
如何配置才能使用数据extensible-1.5.1\src\
就像calendar
在ExtJS的例子