PDA

View Full Version : how to use pagging toolbar in a property grid



andryi
8 Nov 2009, 10:34 AM
Hi all, I've go a problem with my property grid, when I try to see the next row of my Json, don't works, can anybody help me??
this is my code

here is my JsonStore


propertyStore = new Ext.data.JsonStore({
autoLoad: true,
url: 'sp_DailyUtilizationProcess.jsp?Action=L&start=0&limit=10',
root: 'Registries',
totalProperty: 'TotalRegistries',
fields: [
'Registration',//AirframeId
'A/C and Eng Hours per Day',
'A/C Landings per Day',
'Engine Cycles per Day',
'Engine GP/NG/N1 Cycles per Day',
'Engine PT/NP/N2 Cycles per Day',
'Engine N3 Cycles per Day',
'Engine N4 Cycles per Day',
'Aux Systems Hours per Day',
'Aux Systems Starts per Day'
],
listeners: {
load: {
fn: function(store, records, options){
// get the property grid component
var propGrid = Ext.getCmp('propGrid');
// make sure the property grid exists
if (propGrid) {
// populate the property grid with store data
propGrid.setSource(store.getAt(0).data);
}
propGrid.getColumnModel().setConfig([
{header:'Names',width:200, sortable: false, dataIndex: 'name', id:'name',allowBlank:true},
{header:'Values',width:200, sortable: false, dataIndex: 'value', id:'value',allowBlank:true}
]);
}
}
}
});


This is my property Grid


propertyGrid = new Ext.grid.PropertyGrid({
id: 'propGrid',
autoScroll: true,
height: 295,
width: 425,
tbar:[
{
icon: 'sp_Images/btnSave.gif',
cls: 'x-btn-text-icon',
tooltip: 'Click para crear Nuevo.',
enableToggle: false,
text: 'Nuevo',//'Delete'
handler:function(){
//And so how can I clean the informacion in my second column of my property grid
//propGrid.setSource(store.getAt(0).data);
}
},'-',
{
icon: 'sp_Images/btnSave.gif',
cls: 'x-btn-text-icon',
tooltip: 'Click para Guardar Cambio(s).',
enableToggle: false,
text: 'Guardar Cambio(s)',//'Delete',
handler: onSubmit
},'-',
{
icon: 'sp_Images/btnSave.gif',
cls: 'x-btn-text-icon',
tooltip: 'Click para Borrar Registro(s).',
enableToggle: false,
text: 'Borrar Registro(s)'//'Delete',
}
],
source: {}, //initialize source config object
bbar: new Ext.PagingToolbar({
pageSize: 25,
store: propertyStore,
displayInfo: true,
displayMsg: 'Displaying topics {0} - {1} of {2}',
emptyMsg: "No topics to display",
items:[
'-', {
pressed: true,
enableToggle:true,
text: 'Show Preview',
cls: 'x-btn-text-icon details',
toggleHandler: function(btn, pressed){
}
}]
})
});

andryi
8 Nov 2009, 1:18 PM
Is not possible??