seema
12 Dec 2011, 7:13 PM
Hi,
There is one scenario. I have a dataview and on clicking on dataview item, I have to reload an external store. This store will further used to populate a grid.
Is this a possible scenario?
my code is like this-
Ext.sidebar.partnerFilter = new Ext.DataView({
autoScroll: true,
store: strData,
tpl: tplData,
autoHeight: false,
height: 265,
multiSelect: false,
itemSelector: 'div.thumb-wrap',
emptyText: 'No data to display',
loadingText: 'Please Wait...',
style: 'border:1px solid #99BBE8;background:#fff;',
listeners: {
selectionchange: {
fn: function(dataV,nodes){
var record = dataV.getLastSelected();
var filterValues =record.get("filterValues");
myData+= "[";
var len=filterValues.length;
for(var i=0;i<len;i++){
myData+="{name :"+filterValues[i].displayName+"},";
}
myData=Ext.myData.substring(0,Ext.myData.length-1);
myData+="]";
firstGridStore.loadData(myData);
}
}
}
});
here is code for store-
var firstGridStore = Ext.create('Ext.data.Store', {
model: 'DataObject',
data: myData
});
Its throwing me an error "this.data.getRange is not a function".
How could I achieve this. Please suggest
There is one scenario. I have a dataview and on clicking on dataview item, I have to reload an external store. This store will further used to populate a grid.
Is this a possible scenario?
my code is like this-
Ext.sidebar.partnerFilter = new Ext.DataView({
autoScroll: true,
store: strData,
tpl: tplData,
autoHeight: false,
height: 265,
multiSelect: false,
itemSelector: 'div.thumb-wrap',
emptyText: 'No data to display',
loadingText: 'Please Wait...',
style: 'border:1px solid #99BBE8;background:#fff;',
listeners: {
selectionchange: {
fn: function(dataV,nodes){
var record = dataV.getLastSelected();
var filterValues =record.get("filterValues");
myData+= "[";
var len=filterValues.length;
for(var i=0;i<len;i++){
myData+="{name :"+filterValues[i].displayName+"},";
}
myData=Ext.myData.substring(0,Ext.myData.length-1);
myData+="]";
firstGridStore.loadData(myData);
}
}
}
});
here is code for store-
var firstGridStore = Ext.create('Ext.data.Store', {
model: 'DataObject',
data: myData
});
Its throwing me an error "this.data.getRange is not a function".
How could I achieve this. Please suggest