PDA

View Full Version : [CLOSED] MVC Razor - How to show currency in FormpanelFor textfield



LAEUser
Jun 19, 2014, 9:35 PM
Hi

What is the best way to show currency in a textfield using FormPanelFor and model. Is there an attribute or vtype setting that will allow for something like this.

Thanks

LAE

Daniil
Jun 19, 2014, 9:58 PM
Hi @LAEUser,

Welcome to the Ext.NET forums!

As far as I know there is no such the functionality in Ext.NET v2. Something should appear in Ext.NET v3.

As for v2, what about to bind already formatted (on the server) text to a TextField?

LAEUser
Jun 20, 2014, 11:01 AM
Ok, thank you. If I was to use just FormPanel and create form with the fields that I need, is it possible to use some type MaskRe or Vtype like in ASP.NET

thanks

Daniil
Jun 20, 2014, 3:15 PM
If I was to use just FormPanel and create form with the fields that I need, is it possible to use some type MaskRe or Vtype like in ASP.NET

There are such the properties MaskRe and VType. It is for client side validation.
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.form.field.Text-cfg-maskRe
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.form.field.Text-cfg-vtype

To use them you don't need to give up a FormPanelFor. You can set those properties in a Field attribute in the Model.

LAEUser
Jun 21, 2014, 11:39 AM
Thank you. Please close thread.
LAE