Code:
// create the Grid
var grid = Ext.create('Ext.grid.Panel', {
store: store,
plugins: [{
ptype: 'filterbar',
renderHidden: false,
showShowHideButton: true,
showClearAllButton: true
}],
columns: {
plugins: [{
ptype: 'gridautoresizer'
}],
items: [{
text : 'Nr.',
widht : 40,
dataIndex : '$MeldNr',
filter : {
type: 'int',
minValue: 1
}
},
{
text : 'Bestiller',
flex : 0.5,
dataIndex: '$KundeNavn',
filter: {type: 'list', listConfig: {width: 500}}
},
{
text : 'Ansvarlig',
flex : 0.5,
dataIndex: '$Ansvarlig',
filter: {type: 'list', listConfig: {width: 500}}
},
{
text : 'Leveranseansvarlig',
flex : 0.5,
dataIndex: '$Leveranseansvarlig',
filter: {type: 'list', listConfig: {width: 500}}
},
{
xtype: 'actioncolumnpro',
items: [{
iconCls: 'domino',
tooltip: 'Open in Notes client',
handler : function(grid, rowIndex, colIndex) {
var rec = store.getAt(rowIndex);
var docunid = rec.get('@unid');
window.open(notesurl+docunid, '_blank');
}
}]
}
],
},
dockedItems: [{
dock: 'top',
xtype: 'toolbar',
items: [{
iconCls: 'add',
text: 'Ny oppgave',
disabled: false,
handler : function() {
//alert('coming soon..');
Ext.MessageBox.show({
title: 'Info',
msg: 'Scheduled for next version...',
buttons: Ext.MessageBox.OK,
icon: Ext.MessageBox.INFO
});
}
},'->', {
xtype: 'component',
itemId: 'status',
tpl: 'Displaying {count} tasks',
style: 'margin-right:5px'
},'->',{
iconCls: '',
text: currentuser,
disabled: true
}]
}],
features: [groupingFeature],
title: "<a style='cursor:pointer;' href='Notes://DSNotes1/C12572B40034A57D/'><img src='Logo.png'/></a>",
viewConfig: {
stripeRows: true,
loadingText: gridLoadingText
}
});
Thanks for your help !