PDA

View Full Version : 2 List box controls with the left and right move ability



vaishalishah
15 Feb 2010, 2:55 AM
Can any one help me out in creating list boxes with buttons seperating them, On click of button selected item from list box 1 should move to list box 2 and vice versa. Is there a control for this in extjs..or do we have to design it..if so how..could some one help out.

bclinton
15 Feb 2010, 3:07 AM
I don't think anyone has made a control like that, but it wouldn't be very difficult. In fact, it would probably be a pretty good first project to familiarize yourself with Ext.

You are going to want two Ext.form.Combobox: http://www.extjs.com/deploy/dev/docs/?class=Ext.form.ComboBox

and two Ext.Button: http://www.extjs.com/deploy/dev/docs/?class=Ext.Button (http://www.extjs.com/forum/../deploy/dev/docs/?class=Ext.Button)

Stick them in a panel, load the comboxes with data, and write handlers for your buttons to move items back and forth.

vaishalishah
15 Feb 2010, 3:12 AM
I don't think anyone has made a control like that, but it wouldn't be very difficult. In fact, it would probably be a pretty good first project to familiarize yourself with Ext.

You are going to want two Ext.form.Combobox: http://www.extjs.com/deploy/dev/docs/?class=Ext.form.ComboBox

and two Ext.Button: http://www.extjs.com/deploy/dev/docs/?class=Ext.Button (http://www.extjs.com/forum/../deploy/dev/docs/?class=Ext.Button)

Stick them in a panel, load the comboxes with data, and write handlers for your buttons to move items back and forth.


Thx

rbastic
15 Feb 2010, 6:42 AM
(If Java is an option for you)

stephen.friedrich
16 Feb 2010, 4:16 AM
Such a control is already present as a user extension right in the ExtJS distribution.
Look here for the same (the bottom one named "ItemSelector", of course):
http://www.extjs.com/deploy/dev/examples/multiselect/multiselect-demo.html