PDA

View Full Version : Is it possible to show display fields in two columns on FieldSet



psubedi2010
14 Oct 2010, 10:05 AM
I currently have about 10 displayfields within a FieldSet. ExTJS displays them one each line (including Label and value). However, I need to display five display fields on one column and another five on another column within the fieldset. I tried various options with layouts and etc; none seem to show the fields in this arrangement. I tried putting two displayfields within one composite fields (however, Labels do not show; even if I have showLabel set to true.) Will appreciate any sample code to display multiple displayfields within one line in a FieldSet. Thanks!

Jaitsu
14 Oct 2010, 10:10 AM
you can always add a panel with "layout: 'column' " in the config and add your fields in two separate child panels with "layout: 'form' "as necessary...

have a look in the documentation for layout configuration, in particular the column layout

sideeque
14 Oct 2010, 10:30 AM
Here is the some example you can add


var mainFieldSet = new Ext.form.FieldSet({
autoHeight: true,
title: 'Display Fields',
collapsed: false,
collapsible: false,
labelAlign: 'right',
width: 948,
labelWidth: 100,
items: [{
layout: 'table',
items: [{
width: 270,
layout: 'form',
border: false,
items: [item1, item2]
}, {
width: 280,
layout: 'form',
border: false,
items: [item2, item4]
}]
}]
});