【问题标题】:Extjs multi column comboboxExtjs 多列组合框
【发布时间】:2016-02-22 09:57:38
【问题描述】:

如何在 Extjs 中创建多列组合框 组合框数据,如

第 1 列(名字)-第 2 列(中间名)-第 3 列(姓氏)== 组合选择上的第一个数据组合框行,所有其他看起来像这样

-

第 1 列 - 第 2 列 - 第 3 列 == N 个数据

我有 3 个字段名、中间名和姓氏 想要在组合框中显示所有直接来自 JSON 或 Combobox 存储的上述格式的加载数据

【问题讨论】:

  • 请举例说明

标签: javascript extjs


【解决方案1】:

使用组合框的 listConfig 选项

xtype:'combobox',
height: 43,
width: 449,
store: 'searchedStore',
listConfig: {
    loadingText: 'Loading...',
    emptyText: 'No Results.',
    // Custom rendering template for each item
    getInnerTpl: function() {
        return '<table width="100%">'+
             '<tr>'+
                        '<td style="vertical-align:top;width:100%">'+
                        '<div><span style="font-weight:bold;">{name} {middlename} </span><span style="float:right;color:blue">{lastname}</span></div>'+
               '</td>'+
             '</tr>'+
            '</table>';
    }
},

【讨论】:

    猜你喜欢
    • 2012-06-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-08-19
    • 2011-02-28
    • 2012-01-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多