PDA

View Full Version : this.scroller



quintino
6 Apr 2010, 7:29 AM
Hi all,
i'm new on this forum and this is my first thread...
When i load the page 2 grids generate this type of error on firebug :
this.scroller is undefined
chrome://firebug/content/blank.gifvar swfobject=function(){var E="undefi...);Ext.grid.GroupingView.GROUP_ID=1000;ext-all.js (riga 18)


this is the code of my grid


function grid_note_date(){

//creazione griglia
var colModel = new Ext.grid.ColumnModel([
{
header : 'Azioni',
width:50,
sortable : false,
renderer : azioni_date
},
{
header : 'Pratica',
sortable : true,
dataIndex : 'pratica',
width: 120,
renderer : tpl_pratica_date
},
{
header : 'Data scadenza',
sortable : true,
dataIndex : 'scadenza_nota',
width:110
},
{
header : 'Tipo',
sortable : true,
dataIndex : 'tipo_nota',
width:50
},
{
header : 'Ora',
sortable : true,
dataIndex : 'titolo',
width: 100
},
{
header : 'Pr.',
sortable : true,
dataIndex : 'provincia',
width:30
},
{
header : 'Importo affidato',
sortable : true,
align : 'right',
dataIndex : 'importo',
width:100
},
{
header : 'OutStanding',
dataIndex : 'outstanding',
align : 'right',
sortable : true,
width:100
},
{
header : 'Cliente',
dataIndex : 'cliente',
sortable : true,
width:150,
id : 'cliente'
},
{
header : 'Fun',
dataIndex : 'funzionario',
sortable : true,
width:30
},
{
header : 'Col',
dataIndex : 'collaboratore',
sortable : true,
width:30
},
{
header : 'Stato Nota',
dataIndex : 'stato_nota',
sortable : true,
width:100
},
{
header : 'St. Pra.',
dataIndex : 'stato_pratica',
sortable : true,
width:50
},
{
header : 'Data Inserimento',
dataIndex : 'data_inserimento',
sortable : true,
width:100
}]);
var gridView = new Ext.grid.GridView();
var selModel = new Ext.grid.RowSelectionModel({singleSelect : true});
var grid = new Ext.grid.GridPanel({
title : 'Note con orario',
id : 'grid_note_date',
height : 130,
autoWidth : true,
autoscroll:true,
stateful: true,
store : store_note,
stripeRows: true,
view : gridView,
border : true,
colModel : colModel,
viewConfig: {
forceFit:true,
enableRowBody:true,
showPreview:true,
getRowClass : function(record, rowIndex, p, store){
if(this.showPreview){
p.body = '<p>'+record.data.excerpt+'</p>';
return 'x-grid3-row-expanded';
}
return 'x-grid3-row-collapsed';
}
},

// paging bar on the bottom
bbar: {
xtype : 'paging',
id : 'bbar_grid_note_date',
store: store_note,
pageSize : 25,
displayInfo : true
},

loadMask: { msg: 'Caricamento dati in corso...', store: store_note }
});
return grid;
}


thank you for every help and sorry for my bad english :D

Animal
6 Apr 2010, 9:56 AM
view and viewConfig

No. viewConfig is the config for the view.

quintino
6 Apr 2010, 10:34 AM
now i remove the view configuration but the problem isn't solve...
this is the code actually


var grid = new Ext.grid.GridPanel({
title : 'Note con orario',
id : 'grid_note_date',
height : 130,
autoWidth : true,
autoscroll:true,
stateful: true,
store : store_note,
stripeRows: true,
//view : gridView,
border : true,
colModel : colModel,
viewConfig: {
forceFit:true,
enableRowBody:true,
showPreview:true,
getRowClass : function(record, rowIndex, p, store){
if(this.showPreview){
p.body = '<p>'+record.data.excerpt+'</p>';
return 'x-grid3-row-expanded';
}
return 'x-grid3-row-collapsed';
}
},

// paging bar on the bottom
bbar: {
xtype : 'paging',
id : 'bbar_grid_note_date',
store: store_note,
pageSize : 25,
displayInfo : true
},

loadMask: { msg: 'Caricamento dati in corso...', store: store_note }
});

Animal
6 Apr 2010, 10:37 AM
autoWidth conflicts with forceFit obviously.

But that's not your error.

You will have to debug.

quintino
6 Apr 2010, 12:28 PM
i try to remove autoWidth but the error not going away...

Animal
6 Apr 2010, 12:38 PM
No, as I said, you will have to debug.