Thanks to your help I continued searching how to fix my problem to render the gridpanel from treepanel when I select a node. Finally I solved it using the add method (MyPanel_01.add (grid) in the panel. My problem now is finding a way to filter the contents of grid considering the value of two variables that captured when selecting a node in the tree panel
Code:
var a = record.parentNode.raw.name;
and
Code:
var b = record.raw.name;
My questions are:
1. I can load the datastore using a PHP filter to give me the coincidences in Json format?
2. Or is it better to filter the records from the same datastore and load matches in the grid?
Here is my Model and dataStore:
Code:
Ext.define('MigrInterna', {
extend: 'Ext.data.Model',
fields: [
{name:'Pais', type: 'string'},
{name:'DivPola', type: 'string'},
{name:'Archivo', type: 'string'},
{name:'Etiqueta', type: 'string'}
],
});
// create the Data Store
var store_Tabs = Ext.create('Ext.data.Store', {
storeId: 'MigrIntStore',
model: 'MigrInterna',
remoteGroup: true,
buffered: true,
leadingBufferZone: 300,
pageSize: 100,
proxy: {
type: 'ajax',
url: 'SeleccionDeArchivos.php',
reader: {
type: 'json',
root: 'MigrInt'
},
simpleSortMode: true,
simpleGroupMode: true,
groupParam: 'sort',
groupDirectionParam: 'dir'
},
sorters: [{
property: 'title',
direction: 'ASC'
}],
autoLoad: true,
listeners: {
groupchange: function(store, groupers) {
var sortable = !store.isGrouped(),
headers = grid.headerCt.getVisibleGridColumns(),
i, len = headers.length;
for (i = 0; i < len; i++) {
headers[i].sortable = (headers[i].sortable !== undefined) ? headers[i].sortable : sortable;
}
},
beforeprefetch: function(store, operation) {
if (operation.groupers && operation.groupers.length) {
delete operation.sorters;
}
}
}
});
I have searched and tried to do from many examples but I don't found any result, I would appreciate if you can give me further assistance.