PDA

View Full Version : PivotGrid flaws? Row Heights, scrolling, paging



Tumac
18 Oct 2010, 11:37 AM
I have a pivot grid that is working nicely but have the following issues:

1) I cannot get the row heights of the data and the LeftAxis to line up - I keep playing with the height, but still cannot get them to match up. Plus, the closest to where they match up, is by showing all records which is not really feasible if there are hundreds of rows.

2) Scrollable? Seems if I make my Pivot grid less height than the total records, I can scroll by dragging my mouse down, but there are no scroll bars?

3) Paging - Can a pivot grid be pageable?



Ext.ns('STScls.grid');

STScls.grid.widgetTransitCost = Ext.extend(Ext.grid.PivotGrid, {
url: '?c=dashboard&m=dash_skuInTransit'
,method:'POST'
,aggregator: 'sum'
,measure : 'BF'
,viewConfig : {enableRowBody:true,forcefit:true,sortable:true}
,width : 500
,height : 250
,leftAxis :
[
{dataIndex :'skuID'}
,{dataIndex :'cusDescription',width:200}
]
,topAxis :
[
{dataIndex :'cusShort',width:100}
]
,sm: new Ext.grid.RowSelectionModel ({singleSelect: true})
,initComponent:function() {
this.store = this.buildStore();
STScls.grid.widgetTransitCost.superclass.initComponent.call(this);
}
,buildStore : function() {
return {
xtype : 'jsonstore'
,id : 'skuInTransitCost'
,url : this.url
// ,sortInfo : {field: 'seq',dir: 'ASC' }
,autoLoad : true
,fields: [
{name: 'skuID'}
,{name: 'cusDescription'}
,{name: 'BF', type: 'float'}
,{name: 'cusShort'}
,{name: 'seq'}
]
};
}
,loadData : function(d) {
return this.store.loadData(d);
},
load : function(o) {
return this.store.load(o);
},
removeAll : function() {
return this.store.removeAll();
},
remove : function(r) {
return this.store.remove(r);
},
getSelected : function() {
return this.selModel.getSelections();
}

});

Ext.reg('widgettransitcost', STScls.grid.widgetTransitCost);

Tumac
20 Oct 2010, 10:32 AM
I was having the problem with rows lining up and based on feedback from other posts, the requirement seemed to be that the PivotGrid needs a fixed width and height.

Well, I backed out my Width and Height configurations on my PivotGrid and "Walah" my rows line up.

Maybe I got lucky contrary to the feedback?

Also, For a while I could not get the Axis' to show up but after a bunch of tinkering, I got them to show.

I am using a PivotGrid inside a "portlet" panel on a grouptab layout.

Screamy
2 Jan 2011, 9:50 AM
This cured it for me:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">