chsboy 2009-03-17 09:18
浏览 312
已采纳

ext的form修改时要求有的字段置为灰,却得不到值?

修改记录时要求有的字段为灰不可修改,于是我设置该ext form的字段disabled:true,可是提交时却不能从后台得到该字段的值,有没有办法解决这个矛盾的地方。
[b]问题补充:[/b]
to 各位:我以前是用的readonly,但要提示用户不用用户一个个试被否了,mgssnake把你的通过style改变它的样式的方法show我看看
[b]问题补充:[/b]
to leonelwong:我只要将ext form的其中一个input框置灰不是整个form类似如下:
[code="java"]
items : [{
layout : 'column',
border : false,
items : [{
columnWidth : .5,
layout : 'form',
border : false,
items : [{

                    xtype : 'textfield',
                    fieldLabel : '主机代号',
                    name : 'NODEDC',
                    readOnly : true,
                    //disabled:true,
                    anchor : '85%'
                },{

                    xtype : 'textfield',
                    fieldLabel : '组号',
                    name : 'PMGROUP',
                    readOnly : true,
                    anchor : '85%'
                }

[/code]

  • 写回答

7条回答 默认 最新

  • weixin_42312248 2009-03-17 10:36
    关注

    [code="java"]
    new Ext.form.FormPanel({
    renderTo : Ext.getBody(),
    id:"test",
    title : "Test",
    items:[{
    readOnly : true,
    style : "background: #C1C1C1;",
    //style : "color:red",
    xtype : "textfield",
    fieldLabel : "Text",
    value : "textLibinbin"

        },{
            xtype : "textfield",
            fieldLabel : "Text2"
        }
        ]
    })
    

    [/code]

    这样即可达到你要的效果,你自己改变颜色

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(6条)

报告相同问题?

悬赏问题

  • ¥15 Fluent齿轮搅油
  • ¥15 八爪鱼爬数据为什么自己停了
  • ¥15 交替优化波束形成和ris反射角使保密速率最大化
  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素