【发布时间】:2014-07-01 12:25:14
【问题描述】:
Ext JS 是一个基于 JavaScript 和 Html5 的 Web 应用程序框架。 我喜欢在 switch、case 语句中将 radiogroup 列添加到类型列表中。 即使使用 Alexander.Berg 的组件对我也没用
column : function(type , attribs){
var me = this;
var xtype = 'textfield';
var attribs = attribs || {};
var def = {}
switch(type){
case 'id':
xtype = 'numberfield';
def.sortable = false;
def.hidden = true ;
def.hideable = false;
def.allowBlank = true;
break;
case 'readonly':
def.editor = false;
def.flex = 1;
def.sortable = true;
def.allowBlank = true;
def.width = 75;
def.field = {
typeAhead : true,
triggerAction : 'all',
selectOnTab : true,
lazyRender : true,
listClass : 'x-combo-list-small'
}
break;
...
build Columns : function(fields){
var me = this ;
var counter = fields.length();
//zero is false
Ext.each(fields ,function(field){
console.log(field);
fields[counter++] = me.column(field.type||'text' ,field);
});
//console.log(fields);
return fields
}
【问题讨论】:
-
您的问题到底是什么?亚历山大·伯格是谁?什么没用。
-
我想在网格列中有一个 Radio 组。 Alexander Berg 是在 stackoverflow 上发布该领域的组件
-
Alexander Berg 的解决方案在这里:stackoverflow.com/a/17810909
标签: extjs grid radio-group