[CLOSED] ListFilter values

  1. #1

    [CLOSED] ListFilter values

    When I specify "Options" for the ListFilter can I also provide the values I want returned (e.g., "D", "C", "F") or am I stuck with "Dog", "Cat", "Fish" as the return values.


    <ext:GridFilters ID="ActiveUsersFilters" runat="server" >
       <Filters>
          <ext:ListFilter DataIndex="AnimalNm" Options="Dog, Cat, Fish" />
       </Filters>
    </ext:GridFilters>
    Last edited by Daniil; Mar 23, 2012 at 3:44 PM. Reason: [CLOSED]
  2. #2
    Hi,

    You should use the ListFilter GetValue.

    Example
    <ext:ListFilter DataIndex="animal" Options="Dog, Cat, Fish">
        <GetValue Handler="var selected = this.menu.getSelected(); // this is returned by default
                            // transform the selected array as you need
                            return selected;" />
    </ext:ListFilter>
  3. #3
    OK, this works for me. Thanks ...

    <ext:ListFilter DataIndex="animal" Options="Dog, Cat, Fish">
       <GetValue Handler="var selected = this.menu.getSelected();
                var newValues = new Array(selected.length);
                for (var i in selected) {
                   switch (selected[i]) {
                      case 'Dog': newValues[i] = 'D'; break;
                      case 'Cat': newValues[i] = 'C'; break;
                      case 'Fish': newValues[i] = 'F'; break;
                      default: newValues[i] = '';
                   }
                }
         return selected;" />
    </ext:ListFilter>

Similar Threads

  1. [CLOSED] Scrolling ListFilter
    By cwolcott in forum 2.x Legacy Premium Help
    Replies: 6
    Last Post: Sep 05, 2012, 6:07 PM
  2. [CLOSED] ListFilter scroll bar?
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 05, 2012, 5:53 PM
  3. [CLOSED] ListFilter problem
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 12, 2012, 12:51 PM
  4. [CLOSED] How to Initialize a ListFilter with Value(s) ?
    By IT1333 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 01, 2011, 8:35 PM
  5. [CLOSED] ListFilter with a StoreID
    By SFritsche in forum 1.x Legacy Premium Help
    Replies: 14
    Last Post: Oct 08, 2010, 1:51 PM

Posting Permissions