Alpha Video Training
Results 1 to 3 of 3

Thread: Multi-Select List control

  1. #1
    Member
    Real Name
    Jim Roberts
    Join Date
    Aug 2013
    Location
    Itasca, IL
    Posts
    130

    Default Multi-Select List control

    How can I programmatically select multiple items in a list control?

    Lets say I have one list with "Ford", and "Chevy" in it, and another list with "F150", "Mustang", "Corvette", and "Silverado". When Ford is selected in the first list, I'd like F150 and Mustang in the second list to automatically be selected.

    I can get it to select 'all', deselect 'all', and select just one, but I can't see figure out this part.

    Any help would be appreciated.

  2. #2
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,567

    Default Re: Multi-Select List control

    You can put your selection data into an array and pass that into .setValue. Let's say you already have your F150, Mustang, etc. values in an array... and your 2nd List is set to return the Model text e.g. F150. Then you can do this...

    Code:
    var models = ['F150','Mustang','Corvette','Silverado'];
    
    var lObj = {dialog.Object}.getControl('LIST2');
    lObj.setValue(models);
    or

    Code:
    {dialog.Object}.setValue('LIST2',models);

  3. #3
    Member
    Real Name
    Jim Roberts
    Join Date
    Aug 2013
    Location
    Itasca, IL
    Posts
    130

    Default Re: Multi-Select List control

    Thanks David. That did the trick. I knew I had to be missing something simple.

Similar Threads

  1. List Control - Multi Select - Does it create an array?
    By coleresources in forum Mobile & Browser Applications
    Replies: 9
    Last Post: 02-16-2016, 01:23 PM
  2. Make list multi-select or single select dynamically
    By mikeallenbrown in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 08-31-2015, 06:08 PM
  3. Multi-select list control array size
    By Peter.Greulich in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 03-04-2015, 05:14 PM
  4. Multi-Select List Control and Client Side filtering
    By Steve Workings in forum Mobile & Browser Applications
    Replies: 1
    Last Post: 05-14-2014, 11:31 AM
  5. UX List Control - not allowing multi-select or single click
    By erichf in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 04-02-2014, 05:37 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •