1

I want a price field to be displayed as '$'+ 'PRICE' but nothing shows when I use the included code. Can someone please tell me how to concatenate so that the view displays price as $123('PRICE')?

{
    xtype    : 'textfield',
    label    : 'Price',
    name     : 'PRICE'(this comes from store data),
    readOnly : true
}
4

1 回答 1

1

You are asking for the textfield to have a read only value of $XXX, $XXX('PRICE') and 'PRICE'(XXXX) all in the same question. However I think your mistake is just that you are using the name config instead of value. Give the following a shot an see if you can make that work.

        {    
            xtype    : 'textfield',
            label    : 'Price',
            value     : '$' + 'Price',
            readOnly : true
        }

If it turns out that you are instead having trouble getting the actual numeric value for price into the field that is a different issue just post the code involved with loading that data and I'll do my best to help.

Good luck, Brad

于 2013-07-22T18:38:52.103 回答