Results 1 to 3 of 3

Thread: Combobox fire event

  1. #1
    Sencha User
    Join Date
    Aug 2012
    Location
    Pune, India
    Posts
    78
    Answers
    5
    Vote Rating
    0
      0  

    Default Answered: Combobox fire event

    Hi,

    I have used multiple combo box over the UI whose values are dependent on each other. Based on users selection ; I'm populating values in the combo box and it works fine.

    e.g. 1. cboGroups => GroupList
    2. cboApplications => ApplicationList

    In the above example; when user select particular group then I'm populating applications within cboApplications combo box.

    listeners: {
    'select': function (cmb, record, idx) {
    cboApplications.bindStore(store)

    Now my question is how should I bind applications combo box when I'm reading and displaying data from DB. I mean; when I open dialog window then I fetch record from the Database and I get GroupID along with ApplicationID... now I want to bind application combo with GroupID related values.

    One way is; we need to call select event of the group; so that it will take care of filling the application combo box as I have placed application binding code within the listeners: 'select' OR i will need to call ApplicationsStore when I will set Groups value.

    Sorry for writing huge lines; but I hope you are clear what I'm looking for... please suggest me better solution
    Thanks, Pravin

  2. I could able to resolve issue by using following code-

    var cmbApplication= Ext.getCmp("cbApplication");
    cmbApplication.clearValue();
    cmbApplication.bindStore(AD.Master.DataStore.GetApplicationsByGroupStore(groupid));

    where AD.Master.DataStore.GetApplicationsByGroupStore(groupid) fetches data in store from AJAX request.

  3. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3932
    Vote Rating
    1272
      0  

    Default

    I'm sorry, I think this went right over my head. So you have two combos, one for group and one for applications. When you select from group you want to populate the application combo?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  4. #3
    Sencha User
    Join Date
    Aug 2012
    Location
    Pune, India
    Posts
    78
    Answers
    5
    Vote Rating
    0
      0  

    Default

    I could able to resolve issue by using following code-

    var cmbApplication= Ext.getCmp("cbApplication");
    cmbApplication.clearValue();
    cmbApplication.bindStore(AD.Master.DataStore.GetApplicationsByGroupStore(groupid));

    where AD.Master.DataStore.GetApplicationsByGroupStore(groupid) fetches data in store from AJAX request.
    Thanks, Pravin

Posting Permissions

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