# HG changeset patch # User Dustin Demuth # Date 1426761223 -3600 # Node ID 4a9bd2664da6ee05c0578867ed83b58c987008ae # Parent 6fe3cef53e7491c2c70d1ac70e3ab4102e444508 Field Validity in Probenzusatzwerte Grid diff -r 6fe3cef53e74 -r 4a9bd2664da6 app/view/grid/Probenzusatzwert.js --- a/app/view/grid/Probenzusatzwert.js Thu Mar 19 11:25:38 2015 +0100 +++ b/app/view/grid/Probenzusatzwert.js Thu Mar 19 11:33:43 2015 +0100 @@ -67,7 +67,8 @@ store: Ext.data.StoreManager.get('probenzusaetze'), displayField: 'beschreibung', valueField: 'id', - allowBlank: false + allowBlank: false, + editable: false } }, { header: 'Messwert', @@ -76,7 +77,34 @@ flex: 1, editor: { xtype: 'numberfield', - allowBlank: false + allowBlank: false, + maxLength: 10, + enforceMaxLength: true, + allowExponential: false + } + }, { + header: '< NWG', + flex: 1, + renderer: function(value, meta, record) { + var nwg = record.get('nwgZuMesswert'); + var mw = record.get('messwertPzs'); + if ( mw < nwg) { + return '<'; + } + return ''; + } + }, { + header: 'Nachweisgrenze', + dataIndex: 'nwgZuMesswert', + xtype: 'numbercolumn', + format: '0', + flex: 1, + editor: { + xtype: 'numberfield', + allowBlank: false, + maxLength: 10, + enforceMaxLength: true, + allowExponential: false } }, { header: 'Maßeinheit', @@ -93,16 +121,6 @@ return record.get('einheit'); } }, { - header: 'Nachweisgrenze', - dataIndex: 'nwgZuMesswert', - xtype: 'numbercolumn', - format: '0', - flex: 1, - editor: { - xtype: 'numberfield', - allowBlank: false - } - }, { header: 'rel. Unsich.[%]', dataIndex: 'messfehler', xtype: 'numbercolumn', @@ -110,18 +128,11 @@ flex: 1, editor: { xtype: 'numberfield', - allowBlank: false - } - }, { - header: '< NWG', - flex: 1, - renderer: function(value, meta, record) { - var nwg = record.get('nwgZuMesswert'); - var mw = record.get('messwertPzs'); - if ( mw < nwg) { - return 'MW < NWG'; - } - return ''; + allowBlank: false, + maxLength: 3, + enforceMaxLength: true, + allowExponential: false, + allowDecimal: false } }]; this.initData();