3.0.0

Multi-select drop down control to select multiple option

I need to know does activewidgets library have the functionality to create a multi-select drop down.
If yes can u please tell me how this can be done.
Actually my requirement is to select multiple option from a list of available option. I want to have a multi-select drop down with check box against each option, also a checkbox a top to select all option.
sandeep
August 25,

Try this:


var obj = new AW.UI.Combo;

obj.setItemTemplate(new AW.Templates.Checkbox,0);
obj.setItemTemplate(new AW.Templates.Checkbox,1);
obj.setItemTemplate(new AW.Templates.Checkbox,2);
obj.setItemTemplate(new AW.Templates.Checkbox,3);


var items = ["Checkbox All", "Checkbox 1", "Checkbox 2", "Checkbox 3",,"Close / Open"];
var itemsval = ["","","",""];





obj.setItemText(items);
obj.setItemValue(itemsval);
obj.setItemCount(6);

obj.onItemClicked = function(event,i){

if (i==0)
for(var i=0;i<(obj.getItemCount()-2);i++)
obj.setItemValue(obj.getItemValue(0), i);

if (i==3)
alert('Checkbox '+ i +' selected');


if (i<(obj.getItemCount()-1))
obj.setCurrentController("selection", AW.UI.Checked);

}


document.write(obj);

D.Pettersen
August 25,
Pettersen,
Thanks a lot for a quick reply.
sandeep
August 26,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.