Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4344696
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T11:56:00+00:00 2026-05-21T11:56:00+00:00

I have a dijit.form.FilteringSelect component and I want to change the options dynamically. But

  • 0

I have a dijit.form.FilteringSelect component and I want to change the options dynamically. But I get the store from the dijit.form.FilteringSelectwith its store property; there is no setter function in the store. (It may be a dojo.store.Reader)

So how can I change the option of dijit.form.FilteringSelect? Should I change it directly with DOM? Is there any way to update the store behind dijit.form.FilteringSelect?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T11:56:01+00:00Added an answer on May 21, 2026 at 11:56 am

    there is two type of data store in dojo:

    1. dojo.data.ItemFileReadStore – readonly datastore
    2. dojo.data.ItemFileWriteStore – extension of ItemFileReadStore that adds on the dojo.data.api.Write

      In your case, you should use ItemFileWriteStore – it provides functions for modifying data in store.

    E.g.:

    You have array of countries and you want to use it in filtering select:

    [{
       abbr: 'ec',
       name: 'Ecuador',
       capital: 'Quito'
    },
    {
       abbr: 'eg',
       name: 'Egypt',
       capital: 'Cairo'
    },
    {
       abbr: 'et',
       name: 'Ethiopia',
       capital: 'Addis Ababa'
    }]
    

    First of all you will need to create data store js-variable for ItemFileWriteStore.

    <script>
       dojo.require("dojo.data.ItemFileWriteStore");
       dojo.require("dijit.form.FilteringSelect");
    
       var storeData = {
           identifier: 'abbr',
           label: 'name',
           items: //YOUR COUTRIES ARRAY
           }
    </script>
    

    Next step – declare filtering select and itemFileWriteStore in html markup:

    <div dojotype="dojo.data.ItemFileWriteStore" data="storeData" jsid="countryStore"></div>
    <div dojotype="dijit.form.FilteringSelect" store="countryStore" searchattr="name" id="filtSelect"></div>
    

    And finally create special functions for add/delete/modify items in filtering select:

    Add New Item:

    function addItem() {
       var usa = countryStore.newItem({ abbr: 'us', name: 'United States', capital: 'Washington DC' });
    }
    

    I hope here is all clear. Only small note: “identifier” field (“abbr” in our case) must be unique in store

    Delete Items – e.g. removing all items with name “United States of America”

    function removeItem() {
    
       var gotNames = function (items, request) {
          for (var i = 0; i < items.length; i++) {
             countryStore.deleteItem(items[i]);
          }
       }
    
       countryStore.fetch({ query: { name: "United States of America" }, queryOptions: { ignoreCase: true }, onComplete: gotNames });   
    }
    

    As you can see i have created query, that finds items with name == “United States of America” in data store. After the query is executed, function “gotNames” will be called.
    function gotNames removes all items that query return.

    And last function – Edit Item

    it is similar to the delete function. only one difference:

    you should use setValue() method of itemFileWriteStore for changing item property:

    countryStore.setValue(item, "name", newValue); 
    

    Here – page with working example

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have following filteringselect: <select name=v dojoType=dijit.form.FilteringSelect valueList=v id=v value=0><option value=></option><option value=0>0-test</option><option value=1>1-test2/option><option value=2>2-test3</option><option
I have a dijit.form.Select widget. It's tied to a data store, if that matters.
I have some problems getting the custom formated JSON data into a dijit.form.FilteringSelect. It
I have a dijit.form.NumberTextBox input field that starts out with these parms: new dijit.form.NumberTextBox({
I have encountered a strange behaviour using dijit.form.select inside a tooltip-dialog. Here's a shortened
I have a dijit validationtextbox widget: <input dojoAttachPoint=tbIPAddress type=text size=15 class=ipaddress dojoType=dijit.form.ValidationTextBox required=true regExp=^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$
I have a programmatically generated dijit.form.Select. Unlike most other widgets, the Selects do not
I'd like to have a dijit.form.Calendar embedded directly in my dojo form, rather than
I'm having some issues with dijit.form.Select items. In a page i have two of
lets'say i have a form, with like this : <form name=frmMail method=POST action=save.do dojoType=dijit.form.Form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.