-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
51 lines (42 loc) · 1.4 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Ext.ux.grid.column.ActionButtonColumn
=====================================
#### Render button(s) inside the grid cells.
A simple grid column plugin to render buttons inside a grid cell.
### Usage
Ext.define('Your.grid',{
extend: 'Ext.grid.Panel',
requires: ['Ext.ux.grid.column.ActionButtonColumn'],
alias : 'widget.yourgrid',
title : 'No title',
store: 'yourstore',
viewConfig: {
blockRefresh: true,
stripeRows: true
},
columns: [
{header: 'Name', dataIndex: 'name', flex: 1},
{header: 'Firstname', dataIndex: 'firstname', flex: 1},
{
xtype:'actionbuttoncolumn',
width: 200,
header: 'Actions',
items: [{
text: 'Confirm alarm',
handler: function(grid, rowIndex, colIndex) {
var rec = grid.getStore().getAt(rowIndex);
alert("Confirm " + rec.get('firstname'));
}
},{
text: 'Report error',
handler: function(grid, rowIndex, colIndex) {
// console.info(grid);
var rec = grid.getStore().getAt(rowIndex);
alert("Report " + rec.get('firstname'));
}
},{
text: 'Schedule Meeting',
eventName: 'scheduleMeeting'
}]
}
]
});