jQWidgets Forums

jQuery UI Widgets Forums Lists ListBox Select multiple items programmatically

This topic contains 1 reply, has 1 voice, and was last updated by  PaoloBax 12 years, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Select multiple items programmatically #8569

    PaoloBax
    Participant

    Ho can I select multiple items in a ListBox via code?
    If I use a for loop containing something like this:

    $("#myList").jqxListBox("selectedIndex", myIndex);

    only the last index I pass gets selected.
    Is there another method/property in the API which is not documented?
    Thank you.

    Select multiple items programmatically #8570

    PaoloBax
    Participant

    I think I found the answer myself.
    I modified the above code like this:

    $("#myList").jqxListBox("selectIndex", myIndex);

    (selectIndex instead of selectedIndex).
    It seems to work fine.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.