Hybrid View
-
19 Feb 2009 7:04 PM #1
Dynamic check boxes in a 3 column lyout
Dynamic check boxes in a 3 column lyout
Hi,
I have a requirement to display all the check boxes in to a form/page in a 3 column layout.
I am trying to render all the check boxes in to a Xtemplate div in a 3 column layout also My component extends Ext Box component ( all the check boxes are dynamic data comes from the server,3 column layout has to be adjusted automatically),any Idea how to do this ?
Thanks,
Trinad.
-
20 Feb 2009 9:06 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Frederick MD, NYC, DC
- Posts
- 16,169
- Vote Rating
- 28
Trinad, this is interesting timing. I just finished writing about this.
Have you tried the checkbox group?
Code:var checkboxes = { xtype : 'checkboxgroup', fieldLabel : "Which do you own", anchor : '100%', defaults : { bodyStyle : 'background-color: #DFE8F6;', }, columns : 2, // change the number here items : [ { boxLabel : 'Cat', inputValue : 'cat' }, { boxLabel : 'Dog', inputValue : 'dog' }, { boxLabel : 'Fish', inputValue : 'fish' }, { boxLabel : 'Bird', inputValue : 'bird' } ] } var fp = { xtype : 'form', labelWidth : 110, items : checkboxes, frame : true } new Ext.Window({ title : '', layout : 'fit', height : 90, width : 320, borde : false, items : fp }).show();
Jay Garcia @ModusJesus || Modus Create co-founder
Ext JS in Action author
Sencha Touch in Action author
Get in touch for Ext JS & Sencha Touch Touch Training
We are also working on Video-based Sencha Touch training: Check it out here.


Reply With Quote