:: Forum >>
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
Tuesday, August 25, 2009
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
Tuesday, August 25, 2009
Pettersen,
Thanks a lot for a quick reply.
sandeep
Wednesday, August 26, 2009
This topic is archived.
Back to support forum
Forum search