3.2.0

CheckedList

How do I check an item given it's value?

var lst_Columns = new AW.UI.CheckedList;
lst_Columns.setId("lst_Columns");
lst_Columns.setItemText( ["Batch", "Company", "Name" ] );
lst_Columns.setItemValue( ["batch", "company", "name" ] );
lst_Columns.setItemCount(4);
lst_Columns.refresh();

// this doesn't work
lst_Collumns.setSelectedItem( "batch" );


NOTE: I can't find any of these methods in your documentation. I mainly operating by luck and example. The documentation is not searchable. Every time I have ANY question at all I can count on spending at least an hour trying to figure out your documentation once again. I'm about to toss this very nice library over board dude because it's taking me to long to figure out how to use it. You only have what, 15 main controls? Your posted examples are trivial in the extreme. What is wrong?
David Neubauer
September 26,
Although I agree with having problems with documentation, it however dosen't apply to your problem.

The List control is "tied" to an array of items which you can declare separately or directly use with the list control like you've done in the example.

I recommend that you declare a separate array for list control values and use javascript functions to find the element using its value. Then once you have the index of that item, use it in setSelectedItem method to select the item.
Sumit Madan
September 27,

This topic is archived.

See also:


Back to support forum