如何在Extjs中创建多列组合框 组合框数据如
第 1 列(名字)- 第 2 列(中间名)- 第 3 列(姓氏)== 组合选择上的第一个数据组合框行,所有其他看起来像这样
-
第 1 列 - 第 2 列 - 第 3 列 == N 数据
我有 3 个字段:名字、中间名和姓氏 想要在组合框中显示所有直接从 JSON 或组合框存储的上述格式的加载数据提交的数据
最佳答案
使用组合框的列表配置选项
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>';
}
},
关于javascript - Extjs 多列组合框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35550594/