3

Ext JS is a framework for web application based on JavaScript and Html5. i like add radiogroup column to list of type at switch,case statment. even using Alexander.Berg's component is not useful for me

    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
        }
Farzad.Jafari
  • 230
  • 1
  • 9

1 Answers1

0

You can use UX component column

http://skirtlesden.com/ux/component-column

Renganathan M G
  • 5,039
  • 2
  • 31
  • 35