ExtJS Two and more separators on numberfields -
Let me know, how can you use two types of separator digital input fields? You can only use one of the standard methods, but in a separate keyboard layout, keeping the data in one format requires another, which is '.'
Input: 10,789 or 10.789 Save: 10.789
To edit the integral field I Ext.form.NumberField .
Part of my code:
var editor = new Ext.ux.grid.RowEditor ({saveText: LANG ['update'], listeners: {afteredit: function (Object, change, r, line index) {Ext.MessageBox.alert (LANG ['alert_info'], lang ['memory']);}}}}); Var user grid = new Ext.grid.GridPanel ({id: 'status-form', area: 'center', margin: '5 5 5', Store: Gistore, IconCLS: 'icon-grid', plugins: [ Editor, Summary:], CMS: New Ext.grid.ColumnModel ([{header: "ID", width: 30, sorted: true, datindex: 'idb', renderer: formatID}, {xtype: 'datecolumn', header : 'D / m / y', format: 'd / m / y', editor: 'Date', Group Renderer: Extension.Autter.formatetreader ('MY'),: LANG ['Date'], Width: 70, Sorted: Correct, DateIntex: New extension .form.D AteField ({value: (new date ()) format ('d / m / y'), // format: 'd / m / y', minValue: '01 / 01/2010 ', // format (' D / M / Y '), Editable: Wrong}}}, {Header: LANG [' title '], Width: 150, Sortable: Right, Dataindex X:' Title ', Editor: New Extension.form.textfield ({}}, Summary Type: 'Count', SummaryRenderer: Function (V, Parameters, Data) {Return (v === 0 || V> 1) lang ['task'] + ': + V: '1' + ['Task']);}}, {Header: LANG ['lenght'], width: 60, sortable: true, dataIndex: 'lenght', renderer: formatcam, align: The center 'Summary, type:' sum ', summaryRenderer: Ext.util.format. Surface 2, Editor: New Extension.Number Field ({Permission denied: wrong, decimal reproduction: 2, // decimal separator: ',', maximum value: 1000 // permission box: wrong}}}, {header: LANG ['time '' Sum '', Editor: New Ext.form.NumberField ({// format: 'H: I'), Width: 30, Sorted: Correct, DataIntex: Permission denied: false, decimal credentials: 2, decimal separator: ':'})}, {header: lang ['vs'], width: 50, Sorted E: True, DataIntex: 'vs', Renderer: FormatCom, Align: 'Center', Summary Type: 'Avg', SummaryRenderer: Ext.util.Format.cifres2, Editor: New Ext.form.NumberField ({ AllowNegative: false, decimal, integer: 'vmax', renderer: formatcam, align: 'center', type summary: 'max', 'max', summary renderer: ext.util.format.cifres2, editor: new Ext .form.NumberField ({permission denied: incorrect, decimal reproduction: 2, maximum value: 100})}, ............
I used it in my project but I do not know that it is worthy of your request. I
Firstly, check the value where this number is and". "Then Put a reasonable price based on this situation. if it is not "." In value then the function replaces
value.match (/ ^ [0-9] + \. [0-9] * $ /)? Number (value): number ((value.replace (',', '.')));
Comments
Post a Comment