View Full Version : Not empty GridPanel

16 Nov 2011, 2:19 AM
Good morning,
My application shows a different behaviour between FireFox and IE.
There's a GridPanel filled with a JsonStore, this is the grid definition:

var resultSourceGrid = Ext.extend(Ext.grid.GridPanel, {
initComponent: function() {
Ext.apply(this, {
hideLabel: true,
border: false,
stripeRows: true,
header: false,
disableSelection: true,
loadMask: false,
height: 600,
width: 804,
columns: [
{header: 'Titolo', width: 90, sortable: false, renderer: linksRenderer, dataIndex: 'title'},
{header: 'Score', width: 10, sortable: false, dataIndex: 'score'}
selModel: sm,
view: new Ext.grid.GridView({
showGroupName: false,
groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})',
rowSelector: 'div.x-grid3-row',
getRowClass : function(record, rowIndex, p, store){
var app = record.json.snippet;
var part1 = '<div style="margin-top:5px"><b>Fonte:</b>'+record.get('data-source')+'</br></br>';
if(app != undefined){
for(var i=0; i<app.length; ++i){
part1 += app[i];
var app2 = record.get('identifier');
app2 = app2.replace(/\\/g, "/");
app2 = app2.replace(/\'/g,"\\'");
part1 += '</br><a href="#" onclick="openPDF(\''+app2+'\')">Copia File Originale</a></div>';
p.body = part1;
return 'x-grid3-row-expanded';
resultSourceGrid.superclass.initComponent.apply(this, arguments);

The anomaly occurs when the jsonStore is empty.
In IE the grid appears blank on the other hand with FireFox in the grid appear the static strings of the GetRowClass function in the GridView.
Having said that, I would know if this is a normal behaviour and how I can solve this issue.

16 Nov 2011, 11:06 AM
Ext4? These are the Ext3 forums...No Ext 3 GridView can possibly be mistaken for the config you've got...

17 Nov 2011, 6:37 AM
Darthwes this code is developed on ext 3.3.3, anyway I have created another post more specific here:
http://www.sencha.com/forum/showthread.php?155296-blank-GridPanel-issue (http://www.sencha.com/forum/showthread.php?155296-blank-GridPanel-issue)
In that post I have submitted two screenshots to show the different behaviours.

I'm sorry for the double post but I didn't know that my enterprise has had the Premium access in this forum.
Thanks a lot.

17 Nov 2011, 8:47 AM
Again, this can not work in 3.3 without some overrides/ux packages.

Ext.grid.GridView does not define, use, or mention showPreview, showGroupName, and groupTextTpl properties.

Perhaps you meant to use an Ext.grid.GroupingView?

Or show us the ux/overrides?