Ver Mensaje Individual
  #2  
Antiguo 15-04-2013
Neeruu Neeruu is offline
Miembro
 
Registrado: oct 2007
Posts: 485
Reputación: 17
Neeruu Va por buen camino
Código:
Ext.onReady(function(){

  var mydataGrid=[];
	var StoreEgresoVehiculo=Ext.create('Ext.data.Store', {
		storeId:'StoreEgresoVehiculo',
		autoLoad: true,
		fields:[
				{name:'Vehiculo'	, type: 'string'}, 
				{name:'Patente'		, type: 'string'}, 						
				],
          data:{'items':[]},
		buffered:true, 
		enablePaging:true,
		pageSize :1,
		proxy: {
			type: 'memory',
			reader: {
				type: 'json',
				root: 'items'
			}
		}	
	})  ;			

	Grid = Ext.create('Ext.grid.Panel', {
		id:'sIDGrilla',
		title: 'Datos',
		titleAlign:'center',
		store: StoreEgresoVehiculo,
		flex:1,		
		columns: [
			{ 	text: 'Veh\u00edculo', 
				dataIndex: 'Vehiculo', 
				align: 'left', 
				menuDisabled:true,
				width:130,
			},				
				
			{ 	text: 'Patente', 
				dataIndex: 'Patente', 
				align: 'left', 
				menuDisabled:true,
				width:130,				
			}								
			],			
		height:200,
		width: '100%', 
		scroll:'vertical',
		loadMask: true,
		renderTo: Ext.getBody(),
		bbar: 
			Ext.create('Ext.PagingToolbar', {
				store: StoreEgresoVehiculo,
				displayInfo: true,
				displayMsg: 'Mostrador Registros {0} - {1} de {2}',
				emptyMsg: "No Hay Datos Para Mostrar",
				items:[
					'-', {
					text: 'Cargar Datos.',										
					handler: 
						function() {                          
                          mydataGrid.push({Vehiculo:'CAR',Patente:'XXX'});     
                          alert('Datos Cagados');
						},
					},
					{
					text: 'Paginar.',										
					handler: 
						function() {
                        StoreEgresoVehiculo.loadData(mydataGrid,true);
						StoreEgresoVehiculo.loadPage(1);				
						},				
					},
					{
						text:'Pagina2',
						handler:
							function(){							
							}
					}
				]				

			}),		
	});	
});
Alguien podría decirme porque no se carga las paginas? Que esta mal en el código?

Gracias.
__________________
Saluda Atte Neeruu!!! :)

Última edición por Casimiro Notevi fecha: 05-04-2014 a las 10:23:32.
Responder Con Cita