Results 1 to 3 of 3

Thread: Select Field Change after Tap on List View

  1. #1
    Sencha User
    Join Date
    Nov 2014
    Posts
    21
    Answers
    2

    Default Answered: Select Field Change after Tap on List View

    Hello,

    I'm working with sencha architect.

    I have a store with a few items.

    So, when I select an entry of the listview, I call the method onItemTap.
    There, it should filter the store from the select field.

    so, data looks something like this:

    list view:
    • NUMBER 011 | NAME1
    • NUMBER 032 | NAME2
    • NUMBER 045 | NAME3
    store from select field:
    • ID1 | NUMBER011
    • ID2 | NUMBER011
    • ID3 | NUMBER045
    • ID4 | NUMBER011
    So, when you select in List View NAME1 there should appear ID1, ID2, ID4 in the select field.

    Hope, someone has an idea....

    ______________________________________

    Try and error 1:
    Code:
    var select= record.get("number");
    Ext.getStore('SelectStore').filterBy(function(record, id){
       return record.data.number == select;
    }, this);
    Try and error 2:
    Code:
    // selectfieldvar selectfield = Ext.getCmp("select-field");
    
    
    
    selectfield .getStore().clearFilter(); // remove the previous filter
    
    
    selectfield .getStore().filter('number', number);
    selectfield .getStore().load();
    Try and error 3:
    Code:
    var store = Ext.getStore("SelectStore");
    var number = record.get("number");
    
    
    store .clearFilter();
    store .load();
    store .filter('number ', number );

  2. Hello,Thank you for your answer.I do not understand Fiddle, but I tried it with an architect example. There it works....So, it must be an issue with the store.In the test example, I save the data directly in the store and in my real app I get the data from my local WEBSql database.I appended the example here Attachment 52033.I will write again, when I tried it with data from the database.Thanks _______________________________________EDIT: it works this way. There was another Problem within my storage. Now everything is tidied up and working fine

  3. #2
    Sencha User joel.watson's Avatar
    Join Date
    Nov 2014
    Posts
    3,120
    Answers
    446

    Default

    Hi--

    Can you create a Fiddle that demonstrates this issue? https://fiddle.sencha.com
    I'll be happy to test this along with you.

    Thanks!
    Joel

  4. #3
    Sencha User
    Join Date
    Nov 2014
    Posts
    21
    Answers
    2

    Default

    Hello,Thank you for your answer.I do not understand Fiddle, but I tried it with an architect example. There it works....So, it must be an issue with the store.In the test example, I save the data directly in the store and in my real app I get the data from my local WEBSql database.I appended the example here app.zip.I will write again, when I tried it with data from the database.Thanks _______________________________________EDIT: it works this way. There was another Problem within my storage. Now everything is tidied up and working fine
    Last edited by kaddah; 24 Mar 2015 at 11:40 PM. Reason: Solution

Tags for this Thread

Posting Permissions

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