]>
git.proxmox.com Git - extjs.git/blob - extjs/examples/kitchensink/classic/samples/view/grid/Spreadsheet.js
2 * Demonstrates the Spreadsheet selection model.
6 * - Single / Range / Multiple individual row selection.
7 * - Single / Range cell selection.
8 * - Column selection by click selecting column headers.
9 * - Select / deselect all by clicking in the top-left, header.
10 * - Adds row number column to enable row selection.
11 * - Selection extensibility using a drag gesture. Configured in this case to be up or down.
13 * Copy/paste to system clipboard using Ctrl+C, Ctrl+X and Ctrl+V.
15 Ext
.define('KitchenSink.view.grid.Spreadsheet', {
16 extend
: 'Ext.grid.Panel',
18 'Ext.grid.selection.SpreadsheetModel',
19 'Ext.grid.plugin.Clipboard',
20 'KitchenSink.store.grid.MonthlySales'
23 exampleTitle
: 'Spreadsheet with locking',
26 path
: 'classic/samples/view/grid/SpreadsheetController.js'
29 path
: 'classic/samples/store/grid/MonthlySales.js'
32 path
: 'classic/samples/model/grid/MonthlySales.js'
36 // There is no asymmetric data, we do not need to go to the expense of synching row heights
40 controller
: 'spreadsheet',
53 // Disables sorting by header click, though it will be still available via menu
59 // Enable CTRL+C/X/V hot-keys to copy/cut/paste to the system clipboard.
66 selectionchange
: 'onSelectionChange'
72 tooltip
: 'Reload Data'
81 toggleHandler
: 'toggleRowSelect',
86 toggleHandler
: 'toggleCellSelect',
91 toggleHandler
: 'toggleColumnSelect',
99 { text
: 'Year', dataIndex
: 'year', width
: 70, minWidth
: 70, locked
: true },
100 { text
: 'Jan', dataIndex
: 'jan', width
: 100 },
101 { text
: 'Feb', dataIndex
: 'feb', width
: 100 },
102 { text
: 'Mar', dataIndex
: 'mar', width
: 100 },
103 { text
: 'Apr', dataIndex
: 'apr', width
: 100 },
104 { text
: 'May', dataIndex
: 'may', width
: 100 },
105 { text
: 'Jun', dataIndex
: 'jun', width
: 100 },
106 { text
: 'Jul', dataIndex
: 'jul', width
: 100 },
107 { text
: 'Aug', dataIndex
: 'aug', width
: 100 },
108 { text
: 'Sep', dataIndex
: 'sep', width
: 100 },
109 { text
: 'Oct', dataIndex
: 'oct', width
: 100 },
110 { text
: 'Nov', dataIndex
: 'nov', width
: 100 },
111 { text
: 'Dec', dataIndex
: 'dec', width
: 100 }