Affichage des articles dont le libellé est using CheckboxSelectionModel to select multiple rows. Afficher tous les articles
Affichage des articles dont le libellé est using CheckboxSelectionModel to select multiple rows. Afficher tous les articles

jeudi 26 février 2015

using CheckboxSelectionModel to select multiple rows

Code:



var xg = Ext.grid;

var checkboxSelector = new xg.CheckboxSelectionModel({
header:'',
handleMouseDown:Ext.emptyFn,
listeners : {
'rowselect': function (selectionModel, rowIndex, record){
var valueSelected = record.get ('actionId');
}
}
});


var erroneousActionsGrid = new xg.GridPanel({
id:'erroneousActionsPanel',
layout: 'fit',
store: store,
cm: new xg.ColumnModel([
checkboxSelector,
{header: "Action Name", width: 80, sortable: true , dataIndex: 'actionName'},
{header: "Action Id", width: 30, sortable: true , dataIndex: 'actionId'},
{id:'files',header: "File Id", width: 30, sortable: true , dataIndex: 'fileId', renderer: function (value, metaData, record, rowIndex, colIndex, store) {return '<a href=file/lifeCycleFile/'+ value +'>' + value +'</a>'; }},
{header: "Task Id", width: 30, sortable: true , dataIndex: 'taskId'},
{header: "User Name", width: 50, sortable: true , dataIndex: 'userName'},
{header: "Execute Date", width: 30, sortable: true , dataIndex: 'executeDate', renderer: Ext.util.Format.dateRenderer('Y/m/d H:i:s')}
]),
bbar: actionListPagingBar,
plugins: [{
ptype: 'perpagefield',
beforeText: ''
}],
sm: checkboxSelector,





using CheckboxSelectionModel to select multiple rows