GIGJ.COM
welcome to my space
X
Welcome to:gigj.com
Search:  
Personal Injury | Languages | Soups | Photography | Email | Prepress | Exotic Locations | Computer Games | Related articles
NAVIGATION: Home >>
Need assistance on pre filtering combo box
Published by: cfz 2009-01-08
  • I need to pre filter new third combo box from the value preselected in the second combo box. All stores are populated fine. I cannot get the filter to apply on forms intial rendering. Any assistance would be apprciated.


    Ext.onReady(function() {
    var ds_Org = new Ext.data.JsonStore( {
    url : 'data/OrgDropDown.asp',
    root : 'data',
    fields : [ {
    name : 'orgid',
    type : 'string'
    }, {
    name : 'orgsdesc',
    type : 'string'
    }, {
    name : 'orgldesc',
    type : 'string'
    }]
    });

    var ds_Plant = new Ext.data.JsonStore( {
    url : 'data/PlantDropDown.asp',
    root : 'data',
    fields : [ {
    name : 'plantid',
    type : 'string'
    }, {
    name : 'plantsdesc',
    type : 'string'
    }, {
    name : 'plantldesc',
    type : 'string'
    }, {
    name : 'orgid',
    type : 'string'
    }]
    });

    var ds_OC = new Ext.data.JsonStore( {
    url : 'data/OperationCenterDropDown.asp',
    root : 'data',
    fields : [ {
    name : 'ocid',
    type : 'string'
    Macroquest2 Documentation::
    compiling MacroQuest2 for someone else, they need to run MQ2Auth.exe on their computer. The call stack will be seen in the stack frame combo box.
    http://www.macroquest2.com/includes/wassup/manual.php
    HOME
    }, {
    name : 'ocsdesc',
    type : 'string'
    }, {
    name : 'osldesc',
    type : 'string'
    }, {
    name : 'plantid',
    type : 'string'
    }]
    });

    ds_Org.on('load', function(){
    cb_Org.setValue(ds_Org.getAt(0).get('orgid'));
    cb_Org.mode = 'local';
    }, this, {single:true});

    ds_Plant.on('load', function(){
    cb_Plant.setValue(ds_Plant.getAt(1).get('plantid') );
    cb_Plant.mode = 'local';
    }, this, {single:true});

    ds_OC.on('load', function(){
    ds_OC.filter('plantid', ds_Plant.getAt(1).get('plantid'));
    cb_OC.setValue(ds_OC.getAt(0).get('ocid'));
    cb_OC.mode = 'local';
    }, this, {single:true});

    ds_Org.load();
    ds_Plant.load();
    ds_OC.load();

    var cb_Org = new Ext.form.ComboBox( {
    store : ds_Org,
    mode: 'remote',
    displayField : 'orgsdesc',
    valueField : 'orgid',
    triggerAction : 'all',
    id : 'org',
    fieldLabel : 'Organization',
    editable : false,
    forceSelection : true,
    disabled: false
    });

    var cb_Plant = new Ext.form.ComboBox( {
    store : ds_Plant,
    mode: 'remote',
    displayField : 'plantsdesc',
    valueField : 'plantid',
    triggerAction : 'all',
    id : 'plant',
    fieldLabel : 'Plant',
    editable : false,
    Talk:Thunderbird:Archived Home Page - MozillaWiki::
    44 Reminders Assistant. 45 Subscription manager. 46 Add email address and filter for the e-mail I write, choosing in a combo box among those I defined for the
    http://wiki.mozilla.org/Talk:Thunderbird:Archived_Home_Page
    HOME
    Master Visual Basic 6.0 , Illustrator 10 , Golive 7.0 - eBay (item ::
    How to use the List Box at toolbox. How to use the Combo Box at toolbox Keywords is pre-installed with this Adobe Illustrator 10 Filter and Effect learning
    http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=250338797679
    HOME
    forceSelection : true,
    disabled: false
    });

    var cb_OC = new Ext.form.ComboBox( {
    store : ds_OC,
    mode: 'remote',
    displayField : 'ocsdesc',
    valueField : 'ocid',
    triggerAction : 'all',
    id : 'OpCenter',
    fieldLabel : 'Operation Center',
    editable : false,
    forceSelection : true,
    disabled: false
    });

    cb_Org.on('select', function(){
    var strValue = cb_Org.getValue();
    cb_Plant.setValue(ds_Plant.getAt(1).get('plantid') );
    cb_OC.store.filter('plantid', ds_Plant.getAt(1).get('plantid'));
    });

    cb_Plant.on('select', function(){
    cb_OC.enable();
    cb_OC.store.filter('plantid', cb_Plant.getValue());
    cb_OC.setValue('0');
    });

    var form = new Ext.form.FormPanel( {
    labelWidth: 125,
    url:'save-form.php',
    frame:true,
    title: 'Simple Form',
    bodyStyle:'padding:5px 5px 0',
    width: 375,
    defaults: {width: 200},
    applyTo: 'D1',
    items : [cb_Org,cb_Plant,cb_OC]
    });

    });



    Thanks


  • Do the initial filtering in the onload handlers.


  • I'm filtering the store directly then setting the combo box default valuein the following code.


    ds_OC.on('load', function(){
    ds_OC.filter('plantid', ds_Plant.getAt(1).get('plantid'));
    cb_OC.setValue(ds_OC.getAt(0).get('ocid'));
    cb_OC.mode = 'local';
    }, this, {single:true});


    Do I need to filter directly on the combo box with


    cb_OC.filter('plantid', ds_Plant.getAt(1).get('plantid'));


    I tried this and still got the same result.


  • Obviously you have to perform the filter on the Store after it is loaded.


  • Animal, I'm away of this and believe this is what I'm doing with the following line in the onload event function



    ds_OC.filter('plantid', ds_Plant.getAt(1).get('plantid'));




    This filter is not being applied to the options in the drop down. If I make a selection in the second dropdown, then the filter works. The filter does not apply on the initial load.


  • If you noticed in the code, I'm doing this. It is not applying as expected. and no errors in code. What next?


  • No, you're calling setValue in the load, not store.filter





  • Nortel Unveils Vision, Strategy for Israeli High-Performance Net
    Busy Friday Leads to Strong Close for Net Stocks
    You are looking at:gigj.com's Need assistance on pre filtering combo box, click gigj.com to home
    #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Need assistance on pre filtering combo box , Please add it free.
  • poll coffee or cocoa
  • calling all brits
  • what are good colleges with good swimming teams
  • square face new hair cut ideas
  • new hair styles help please easy
  • what is your favorite rock album
  • scrunching my hair i need help badly
  • when and why did nick jonas dump miley cyrus
  • can you do this if you have a band that is not famous yet
  • poll joe jonas or nick jonas
  • did you cry when you saw
  • did you ever have an obe out of body experience
  • what do divers need to breath
  • who does it better than you
  • are nick jonas and miley cyrus cousins
  • help me please how do you
  • poll do you keep your love lockdown
  • those who have brothers and sisters
  • is it true miley cyrus and nick jonas are a couple now
  • zac efron dead miley cyrus pregnant nick jonas gay
  • girls do u like nick jonas or joe jonas
  • is there a song that reminds you of your angsty years
  • will swim team help my loose a lot of weight
  • why did miley cyrus and nick jonas breakup
  • olympic help 10 easy points
  • what happened to judy franco of 101 5fm
  • first swim meet help please
  • About us |Contact us |Advertisement |Site map |Exchange links
    Copyright© 2008gigj.com All Rights Reserved