小编fre*_*yle的帖子

Extjs - 如何在Grid列中显示组合框

我有一个gridpanel包括日期和组合列jsfiddle

但我不想点击显示我的组合.我希望在没有点击的情况下显示我的组合,而不是隐藏在单元格中

在此输入图像描述

和日期栏一样

在此输入图像描述

我觉得好奇clicksToEdit: 0但失败了

plugins: [
    Ext.create('Ext.grid.plugin.CellEditing', {
        clicksToEdit: 1
    })
]
Run Code Online (Sandbox Code Playgroud)

怎么做,谢谢

grid combobox extjs extjs4.1

18
推荐指数
3
解决办法
3万
查看次数

Extjs - 获取所选行的rowIndex

我已经选择了一行,现在我想获得rowIndex

也许就像

grid.getSelectionModel().getSelection()[0].rowIndex
Run Code Online (Sandbox Code Playgroud)

但它没有定义.我怎么能得到它谢谢

grid extjs extjs4 extjs4.1

10
推荐指数
1
解决办法
5万
查看次数

Extjs Treepanel:CSS更改默认图标(节点和叶子)

我有一个像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)

我怎么能这样做谢谢

tree extjs extjs4 extjs4.1 extjs4.2

8
推荐指数
1
解决办法
9113
查看次数

Extjs 4.1 Combo - 如何使select函数激活当调用combo.setValue时

我有一个像这样的组合

        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/

extjs extjs4.1

8
推荐指数
1
解决办法
2万
查看次数

Extjs 4.2.1 - config autoLoad:false失败

我定义了一个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 extjs4 extjs4.2

8
推荐指数
1
解决办法
5558
查看次数

Extjs - 使用filefield上传文件

我的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)

但是当成功 …

extjs filefield extjs4 extjs4.1

7
推荐指数
1
解决办法
1万
查看次数

如何在xampp 1.8.x中启用php_mssql.dll扩展

我正在使用xampp-win32-1.8.3-1-VC11-installer,我通过删除启用php_mssql.dll扩展php.ini;

我复制php_mssql.dllxampp\php\ext
ntwdblib.dllxampp\apache\bin

我在旧的xampp版本中得到了2个文件.

但是当我开始apache使用xampp时,我得到了

在此输入图像描述

在此输入图像描述

如何解决这个问题

php apache xampp dll

7
推荐指数
1
解决办法
2万
查看次数

Extjs 4.1如何选择组合中的第一项

我的组合看起来像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)

extjs extjs4.1

6
推荐指数
2
解决办法
3万
查看次数

Extjs 4.1 - 多选和上传文件

我在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服务器中获取文件.我该怎么做才能感谢

extjs extjs4.1

6
推荐指数
1
解决办法
9334
查看次数

Calendar Pro - 如何配置使用src路径而不是在extensible-all-debug中

我使用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的例子

extjs extjs4.1

5
推荐指数
1
解决办法
815
查看次数

标签 统计

extjs ×9

extjs4.1 ×8

extjs4 ×4

extjs4.2 ×2

grid ×2

apache ×1

combobox ×1

dll ×1

filefield ×1

php ×1

tree ×1

xampp ×1