PDA

View Full Version : LiveSearchGrid + RowExpander



muselmanach
2 Mar 2013, 12:53 PM
I think LiveSearchGrid + RowExpander Plugin doesnt not work together.
My search doesnt find any record using this code: (without the rowExpander plugin it works perfectly)



var grid = Ext.create('Ext.ux.LiveSearchGridPanel', {
renderTo: document.body,
plugins: [rowEditing],
store: store,
plugins: [{
ptype: 'rowexpander',
rowBodyTpl : [
"<div class='contact'>" +
"<div><b>Website:</b><a href='#'>{website}</a></div>" +
"<div><b>Geburtstag:</b>{birthday}</div>" +
"<div><b>Notiz:</b>{note}</div>" +
"</div>"
]
}],
selModel: Ext.create('Ext.selection.CheckboxModel'),
columns: [{
header: 'Vorname',
width: 100,
sortable: true,
dataIndex: 'firstname',
field: {
xtype: 'textfield'
}
}, {
text: 'Nachname',
width: 100,
sortable: true,
dataIndex: 'lastname',
field: {
xtype: 'textfield'
}
},{
text: 'Email',
width: 200,
sortable: true,
dataIndex: 'email',
field: {
xtype: 'textfield'
}
}, {
text: 'Telefon',
width: 100,
sortable: true,
dataIndex: 'phone',
field: {
xtype: 'textfield'
}
},{
text: 'Adresse',
flex: 1,
sortable: true,
dataIndex: 'address',
minWidth: 200,
field: {
xtype: 'textfield'
}
},{
text: 'Aktionen',
xtype: 'actioncolumn',
id: 'myActionId',
width: 70,
items: [{
icon: icon('user_edit'),
tooltip: 'Kontakt bearbeiten'
},{
icon: icon('user_delete'),
tooltip: 'Kontakt löschen'
}
]
}],
dockedItems: [{
xtype: 'toolbar',
items: [{
text: 'Kontakt hinzufügen',
icon: icon('user_add'),
handler: function(){
// empty record
store.insert(0, new Person());
rowEditing.startEdit(0, 0);
}
}, '-', {
itemId: 'delete',
text: 'Kontakt(e) löschen',
icon: icon('user_delete'),
disabled: true
}]
}]
});