PDA

View Full Version : GridForm



SagarAw
29 May 2012, 1:56 PM
Hi,

I am migrating from v2.2 to v3.4. I suppose there is no GridForm in v3.4.
Can anyone tell me whats the equivalent of GridForm from ExtJS 2.x, for ExtJS 3.4 or latest?

The following snippet is what I am working on: -

var form = new Hypo.form.GridForm({
title: 'Title',
tbar: tbuttons,
items: grid
});

The 'grid' object is being declared as: -

var grid = new Hypo.grid.GridPanel({
store: store,
colModel: new Ext.grid.ColumnModel({
columns: gridColumns
}),
stripeRows: true,
frame: false,
autoExpandColumn: 'name',
autoHeight: true,
//height: 350,
loadMask: true,
bbar: pagingBar,
viewConfig: {
scrollOffset: 2
}
});

On running the app, the 'title' and 'tbar' are displayed properly, however for "items: grid", its giving "Undefined".

sword-it
31 May 2012, 3:08 AM
Hi SagarAw,

Use Ext.form.FormPanel({....}) instead of GridForm({....})
Like this...


var form = new Ext.form.FormPanel({
title: 'Title',
tbar: tbuttons,
items: [grid]
});

var grid = new Ext.grid.GridPanel({
store: store,
colModel: new Ext.grid.ColumnModel({
columns: gridColumns
}),
stripeRows: true,
frame: false,
autoExpandColumn: 'name',
autoHeight: true,
//height: 350,
loadMask: true,

viewConfig: {
scrollOffset: 2
}
});