How to rectify the Ext={version:"2.2"};window["undefined"]=window["undefined"]; error
Hi,
I refered the above sample and I implemented the sample nested grid using GridPanel 2.2. It is not expand the child grid. I got error from firebox during the childGrid = function(record, index) execution time.The error message is Ext={version:"2.2"};window["undefined"]=window["undefined"];Ext.apply=function(C,D,B{if({Ext.apply(C,B}if(C&&D&&typeof D=="object"){for(var A in D){C[A]=D[A]}}return C};(function(){var idSeed=0;var ua=navigator.userAgent.toLowerCase();
I have included the my sample code.
Code:
Ext.onReady(function() {
var xg = Ext.grid;
// shared reader
var reader = new Ext.data.ArrayReader({}, [
{ name: 'id' },
{ name: 'type' },
]);
var dataType = [
[10, 'Published'],
[11, 'UnPublished']]
// row expander
var expander = new Ext.grid.RowExpander({
remoteDataMethod:childGrid ,
tpl: new Ext.Template('<div id="subRemData"></div>')
});
var masterGrid = new xg.GridPanel({
store: new Ext.data.Store({
reader: reader,
data: dataType
}),
cm: new xg.ColumnModel([
expander,
{ header: "Type", width: 200, sortable: true, dataIndex: 'type' }
]),
viewConfig: {
forceFit: true
},
autoHeight: true,
hideHeaders: false,
width: 800,
height: 800,
plugins: expander,
collapsible: true,
animCollapse: false,
disableSelection: true,
trackMouseOver: false,
enableHdMenu: false,
renderTo: document.getElementById('Div1')
});
// Child grid
var dataPGName = [
[10, 10, 'Retail Food'],
[11, 11, 'Chemical']]
var childGrid = function(record, index) {
var id = record.get("code");
var xg = Ext.grid;
var detailedreader = new Ext.data.ArrayReader({}, [
{ name: 'id' },
{ name: 'code' },
{ name: 'name' },
]);
var detailedstore = new Ext.data.Store({
reader: detailedreader,
data: dataPGName
});
var detailedgrid = new xg.GridPanel({
store: detailedstore,
cm: new xg.ColumnModel([
{ header: 'PG ID ', width: 50, sortable: true, dataIndex: 'code' },
{ header: 'PG Name', width: 120, sortable: true, dataIndex: 'name' }
]),
autoHeight: true,
collapsible: false,
disableSelection: true,
trackMouseOver: false,
autoSizeColumns: true
});
detailedgrid.render(Ext.get('remData' + record.data.id));
};
})
Please help me anyone how to rectify that issues.
Id this thread still active? (Row Expander extension question)
Hi all, i had a question regarding the plugin above in the context of the ExtJS MVC acrhitecture. I want the rowExpander to inject a grid panel, as opposed to just changing the styling and using content from the current row. I found an extension (AjaxRowExpander) http://blog.tremend.ro/2008/04/22/ex...ow-expander-2/ which i am unable to integrate.
The examples i have found tend to create then entirety of the app within a single .js file, as opposed to the MVC type setup. My question is, how can i use the row expander to insert a container or panel of some sort such that i can place within it any component i desire?
I cannot seem to port over the plugins which are written in single pieces of script as i continually get errors telling me that Ext.grid is undefined. This is odd bc the first line of app.js is:
Code:
Ext.require(['ux.grid.RowExpander', 'ux.grid.AjaxRowExpander']);
subsequently, the require in rowExpander.js is:
Code:
requires: ['Ext.grid.feature.RowBody','Ext.grid.feature.RowWrap']
SO i think fundamentally im trying to recreate the plugin using Ext.define as opposed to containing it within a single app.js file.
Thanks for any advice!