Results 1 to 4 of 4

Thread: [RESOLVED] Extjs [3.2.1] Multiselect - Select all entries

  1. #1
    Sencha User
    Join Date
    Dec 2008
    Location
    France
    Posts
    321

    Default [RESOLVED] Extjs [3.2.1] Multiselect - Select all entries

    Hello !

    In the multiselect extension, it's possible to select some entries with
    Code:
    msForm.getForm().findField('multiselect').setValue('2,3')
    How to select all entries ?

    (sure it's very simple, but i can't find it )

  2. #2
    Sencha Premium User mankz's Avatar
    Join Date
    Nov 2007
    Location
    Stockholm, Sweden
    Posts
    3,153

    Default

    That doesn't appear to be built-in. Try this override:

    Code:
    Ext.override(Ext.ux.form.MultiSelect, {
        selectAll : function() {
            var ids = this.store.collect(this.valueField);
            this.setValue(ids);
        }
    });

  3. #3
    Sencha User
    Join Date
    Sep 2009
    Location
    Calgary, Alberta, Canada
    Posts
    638

    Default

    You could use a tbar button to allow the user to select all, incorporating the above code that mankz wrote.

  4. #4
    Sencha User
    Join Date
    Dec 2008
    Location
    France
    Posts
    321

    Default

    @ mankz
    Fine !

    To select all entries, you've now to put this code :

    Code:
    msForm.getForm().findField('type_admin').selectAll();
    @CrazyEnigma

    Sure ! I've used the tbar as in the Multiselect example

Posting Permissions

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