Take a look at: http://extjs.com/forum/showthread.php?t=37588
Wow Thanks, that's it.
well almost, there is allways an almost :D
it does all I want it to except that the initial state does not show correctly in the check boxes.
it allways shows all of the boxes as checked, 1/2 should not be chceked.
at this point I don't see my mistake possible to enlighten me ?
QoDesk.Schedule = Ext.extend(Ext.app.Module, {
moduleType : 'demo',
moduleId : 'if-da-schedule',
init : function() {
this.launcher = {
handler : this.createWindow,
iconCls : 'icon-grid',
scope : this,
shortcutIconCls : 'demo-grid-shortcut',
text : 'Data Access Scheduler',
tooltip : '<b>Data access acheduler</b><br />Data access scheduler'
}
},
createWindow : function() {
var desktop = this.app.getDesktop();
var win = desktop.getWindow('if-da-schedule');
if (!win) {
var sm = new Ext.grid.SmartCheckboxSelectionModel({
dataIndex:'action',
email: true, // separates checkbox clicking from row selecting
alwaysSelectOnCheck: true
});
var grid = new Ext.grid.GridPanel({
autoExpandColumn : 'company',
border : false,
ds : new Ext.data.Store({
reader : new Ext.data.ArrayReader({}, [{
name : 'application'
}, {
name : 'id'
}, {
name : 'type'
}, {
name : 'userName'
}, {
name : 'userEmail'
}, {
name : 'nextDate'
}, {
name : 'frequency'
}, {
name : 'status'
}, {
name : 'action'
}]),
data : Ext.grid.dummyData
}),
cm : new Ext.grid.ColumnModel([sm, {
header : "Schedule Name",
width : 70,
sortable : true,
dataIndex : 'application'
}, {
header : "Data Access",
width : 70,
sortable : true,
dataIndex : 'type'
}, {
header : "Created by",
width : 70,
sortable : true,
dataIndex : 'userName'
}, {
header : "Last Run",
width : 100,
sortable : true,
dataIndex : 'nextDate'
}, {
header : "Frequency",
width : 100,
sortable : true,
dataIndex : 'frequency'
}, {
header : "Status",
width : 70,
sortable : true,
dataIndex : 'status'
}, {
header : "Action",
width : 70,
sortable : true,
dataIndex : 'action'
}]),
shadow : false,
shadowOffset : 0,
// plugins : checkColumn,
sm : sm,
tbar : [{
text : 'Add',
tooltip : 'Add a new Schedule',
iconCls : 'demo-grid-add'
}, '-', {
text : 'Remove',
tooltip : 'Remove a selected Schedule',
iconCls : 'demo-grid-remove'
}],
viewConfig : {
forceFit : true
}
});
win = desktop.createWindow({
id : 'if-da-schedule',
title : 'Data access schedule',
width : 850,
height : 600,
iconCls : 'icon-grid',
shim : false,
animCollapse : false,
constrainHeader : true,
layout : 'fit',
items : grid,
taskbuttonTooltip : '<b>Data access acheduler</b><br />Data access scheduler'
});
}
win.show();
}
});
// Array data for the grid
Ext.grid.dummyData = [
['Terminal-pc', 340, 'Data', 'Sam Sur', '
[email protected]',
'Thursday 9/1 12:00am',
'Weekly: every 2 weeks on: Monday, Wensday, Friday', 'Active',
'true'],
['i-Recipe', 341, 'Data', 'Sam Sur', '
[email protected]',
'Thursday 9/1 12:00am', 'Monthly: 18th of every 4 month ',
'Active', 'true'],
['i-Metri', 342, 'Data', 'Sam Sur', '
[email protected]',
'Thursday 9/1 12:00am', 'Monthly: 18th of every 4 month ',
'Suspended', 'false'],
['Terminal-pc', 343, 'Data', 'Michael C Ford',
'
[email protected]', 'Thursday 9/1 12:00am',
'Weekly: every 2 weeks on: Monday, Wensday, Friday', 'Active',
'true'],
['i-Recipe', 344, 'Data', 'Michael C Ford',
'Michael.Fo
[email protected]', 'Thursday 9/1 12:00am',
'Monthly: 18th of every 4 month ', 'Active', 'false'],
['i-Metri', 345, 'Data', 'Michael C Ford',
'
[email protected]', 'Thursday 9/1 12:00am',
'Monthly: 18th of every 4 month ', 'Suspended', 'true'],
['Terminal-pc', 343, 'Data', 'Amit Parikh',
'
[email protected]', 'Thursday 9/1 12:00am',
'Weekly: every 2 weeks on: Monday, Wensday, Friday', 'Active',
'false'],
['i-Recipe', 344, 'Data', 'Amit Parikh', '
[email protected]',
'Thursday 9/1 12:00am', 'Monthly: 18th of every 4 month ',
'Active', 'true'],
['i-Metri', 345, 'Data', 'Amit Parikh', '
[email protected]',
'Thursday 9/1 12:00am', 'Monthly: 18th of every 4 month ',
'Suspended', 'true']];