]>
git.proxmox.com Git - extjs.git/blob - extjs/examples/classic/neptune-components/app/view/grid/widget/Basic.js
1 Ext
.define('Neptune.view.grid.widget.Basic', function() {
3 * Custom function used for column renderer
8 return '<span style="color:green;">' + val
+ '</span>';
10 return '<span style="color:red;">' + val
+ '</span>';
16 * Custom function used for column renderer
19 function pctChange(val
) {
21 return '<span style="color:green;">' + val
+ '%</span>';
23 return '<span style="color:red;">' + val
+ '%</span>';
29 extend
: 'Ext.grid.Panel',
37 { text
: 'Company', flex
: 1, dataIndex
: 'company', editor
: 'textfield' },
38 { text
: 'Price', width
: 75, sortable
: true, formatter
: 'usMoney', dataIndex
: 'price', editor
: 'numberfield' },
39 { text
: 'Change', width
: 75, sortable
: true, renderer
: change
, dataIndex
: 'change', editor
: 'numberfield' },
40 { text
: '% Change', width
: 75, sortable
: true, renderer
: pctChange
, dataIndex
: 'pctChange', editor
: 'numberfield' },
41 { text
: 'Last Updated', width
: 85, sortable
: true, formatter
: 'date("m/d/Y")', dataIndex
: 'lastChange', editor
: 'datefield' },
45 xtype
: 'actioncolumn',
48 icon
: '../shared/icons/fam/delete.gif',