日期:2014-05-17  浏览次数:20681 次

EXT从数据库读数据,数据条目太多需要加滚动条,求高手解决
/**
 * 
 * @class EdiEntJbxxView
 * @extends Ext.Panel
 */

EdiEntJbxxView=Ext.extend(Ext.Panel,{
constructor:function(config){
Ext.applyIf(this,config);
this.initUIComponents();
EdiEntJbxxView.superclass.constructor.call(this,{
id : 'EdiEntJbxxView',
title : '项目基本信息',
iconCls:'menu-appuser',
layout:'border',
autoScroll:true,

});
},
initUIComponents:function(){
this.initGridPanel();

this.items=[this.gridPanel];
}});


EdiEntJbxxView.prototype.initGridPanel=function(){

   
var store = new Ext.data.Store({
proxy : new Ext.data.HttpProxy({
url : __ctxPath + '/edi/queryAllEdiEntJbxx.do'
}),
reader : new Ext.data.JsonReader({
root : 'result',
totalProperty : 'totalCounts',
fields : [{
name : 'id',
type : 'long'
},{
name:'soaType',
type:'short'
},'soaName',
'interfaceSourceId',
'interfaceFromSourceId',
'hastrasfer',
'requestId',
'responseId',
'bussinessId',
{
name:'submitDate',
type:'date'
},
{
name:'dealDate',
type:'date'
},'entXmbh',
'entCbsjgspfdw',
'entCbsjgsspwh',
'entLxny',
'entJsdd',
'entJsxz',
'entJsgm',
'entLxwh',
'entHyzgzzjgdm',
'entHyzgmc',
'entXmyzzzjgdm',
'entXmyzmc',
'entTzgm',
'entJszq',
'entZjly',
'entXmgk',
'entXmsjdw',
'entXmcjdw',
'entXmjldw',
'entSjzj',
'entXmjl',
'entJlzj',
'entBz',
'entXxtjdwzjjgdm',
'entXxtjdw_name',
'entSjzt',
'entJlcssj',
'attributy1',
'attributy2',
'attributy3',
'attributy4'


]
}),
remoteSort : true
});
store.setDefaultSort('id', 'asc');

store.load({
params : {
start : 0,
limit : 25
}
});
var sm = new Ext.grid.CheckboxSelectionModel();
var cm = new Ext.grid.ColumnModel({
columns : [sm, new Ext.grid.RowNumberer(), {
header : 'id',
dataIndex : 'id',
hidden : true
},{
header : '',
dataIndex : 'soaType',
width : 120,
},{
header : '',
dataIndex : 'soaName',
width : 120,
},{
header : '',
dataIndex : 'interfaceSourceId',
width : 120,
},{
header : '',
dataIndex : 'interfaceFromSourceId',
width : 120,
},{
header : '',
dataIndex : 'hastrasfer',
width : 120,
},{
header : '',
dataIndex : 'requestId',
width : 120,
},{
header : '',
dataIndex : 'responseId',
width : 120,
},{
header : '',
dataIndex : 'bussinessId',
width : 120,
},{
header : '',
dataIndex : 'submitDate',
width : 120,
},{
header : '',
dataIndex : 'dealDate',
width : 120,
},{
header : '项目编号',
dataIndex : 'entXmbh',
width : 120,
},{
header : '设计概算