How to control Dojo FilteringSelect default rendering!?
        Posted  
        
            by Nick
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Nick
        
        
        
        Published on 2010-03-22T00:34:48Z
        Indexed on 
            2010/03/22
            0:41 UTC
        
        
        Read the original article
        Hit count: 650
        
Hi,
I have a dojo dijit.filering.select that populates with values from a dojo.data.ItemFileReadStore. Everything is working fine except I would like the filtering select to automatically get populated with the first value in the itemFileReadStore. Currently it is loading them as a list of options that are revealed when you click the down arrow, as per spec. I would instead like filteringSelect to be loaded with the first value. How do I do this? For some reason I cant figure it out. Any help would be hugely appreciated!
Kind Regards Nick Frandsen
<script type="text/javascript">
        function updateOptions(){
            var itemId = dijit.byId("item_select").attr("value");
            var jsonStore = new dojo.data.ItemFileReadStore({ url: "/options/get-options-json/itemId/" + itemId });
            optionSelect.attr("store", jsonStore);
        }
</script>
<select dojoType="dijit.form.FilteringSelect"
        name="option_select"
        id="option_select"
        labelAttr="name"
        required="true"
        jsId="optionSelect">
</select>
© Stack Overflow or respective owner