How to disable items in the DropDownList control

Hello.

I use a data provider for a DropDownList control that has a Boolean field named IE 'locked '.

< s:ArrayCollection id = "dropDownListAC" >
< name fx:Object = 'normal' locked = "true" / >
< name fx:Object = 'hard' locked = "false" / >
< fx:Object name = 'crazy' locked = "false" / >
< / s:ArrayCollection >

How can I do this for individual items in the DropDownList control are disabled if "locked" is true?

Thank you!!

@wejrhwkekdf,.

Use an itemRenderer for your list dropdown and based on the property locked in your data toggle your itemRenderer object.

Thank you

Jean Claude

Tags: Flex

Similar Questions

  • How to read the value of the selected item in the DropDownList control?

    Hello

    The DropDownList component has a selectedItem property is supposed to return a ListBase.

    But what I want is just the 'chain' which is supposed to be the selected item in the DropDownList control.

    How to read this value?

    Thank you

    -Malena

    You are misreading the documentation. ListBase.selectedItem returns an object. This item comes directly from your data provider, so you just have to go up or go for any property you need.

  • DropDownList as renderer, how to pre-select an item in the DropDownList control?

    People in the original documents have given height stored as 1, 2, 3

    1 = tall

    2 = medium

    3 = short

    DropDownList in the DataGrid displays the height in option name.  The requirement is when the page is loaded for the first time, control DropDownList for each record must indicate the original data of the height. How to do?

    Thanks for all the ideas.

    <?xml version="1.0" encoding="utf-8"?>
    <!-- Simple example to demonstrate the MXDataGridItemRenderer control -->
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"    
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx">
        
        <fx:Declarations> 
            <!-- Data provider for the DataGrid -->
            <s:ArrayCollection id="dp1">
                <fx:Object firstName="Alex" enumValue="1"/>
                <fx:Object firstName="Britanny" enumValue="2"/>
                <fx:Object firstName="Charlie" enumValue="3"/>
                <fx:Object firstName="Douglas" enumValue="1"/>
                <fx:Object firstName="Eric" enumValue="2"/>
                <fx:Object firstName="Frank" enumValue="2"/>
            </s:ArrayCollection>        
        </fx:Declarations>
        
        <s:Panel width="75%" height="75%" title="MXDataGridItemRenderer Example" horizontalCenter="0" verticalCenter="0">
            <!-- Halo DataGrid -->
            <mx:DataGrid id="dg1" height="200" width="300" editable="true" dataProvider="{dp1}">
                <mx:columns>            
                    <!-- Column 1 -->
                    <mx:DataGridColumn dataField="firstName" headerText="Name" />
                    <!-- Column 2 -->
                    <!-- itemRenderer used as the itemEditor via rendererIsEditor flag -->
                    <mx:DataGridColumn dataField="enumValue" headerText="Size" editorDataField="editValue" rendererIsEditor="true">
                        <mx:itemRenderer>
                            <fx:Component>                            
                                <s:MXDataGridItemRenderer height="22" >     
                                    <!-- function to set the value selected by the user -->
                                    <fx:Script>
                                        <![CDATA[                                
                                            public function get editValue():* {
                                                return ddl.selectedItem;
                                            }
                                        ]]>
                                    </fx:Script>
                                    <!-- DropDownList used as renderer and itemEditor -->
                                    <s:DropDownList id="ddl" width="100%" height="100%" labelField="HeightName" selectedItem="{data.enumValue}">
                                        <s:dataProvider>
                                            <s:ArrayList>
                                                <fx:Object HeightID="1" HeightName="Tall" />
                                                <fx:Object HeightID="2" HeightName="Medium" />
                                                <fx:Object HeightID="3" HeightName="Short" />
                                            </s:ArrayList>
                                        </s:dataProvider>
                                    </s:DropDownList>
                                </s:MXDataGridItemRenderer>
                            </fx:Component>
                        </mx:itemRenderer>
                    </mx:DataGridColumn>                 
                </mx:columns>
            </mx:DataGrid>    
        </s:Panel>          
    </s:Application>
    

    Hi Alex,

    Please find the code to work for your problem. I did it in Flex3... but you can do even in Flex4.

    Since it is just a function in your script. Check out the code below:


    http://www.Adobe.com/2006/mxml">
       
                             
    ]]>
       


           
           
           
           
           
           
       
      
           
       
    paddingTop = "10" paddingLeft = "10" paddingRight = "10" paddingBottom = "10" >
           
            
             
             
              
                                        
                
                 
                     
                         
                         
                         
                     

                 

                 
                  Import mx.collections.ArrayCollection;
                  
    private function setDDLSelectedItem (): void
    {
    var ddlDP:ArrayCollection = this.dataProvider as ArrayCollection collection;
    for (var intLoop:int = 0; intLoop<>
    {
    var v1:int = data.enumValue;
    var v2:int = ddlDP.getItemAt (intLoop). HeightID
                    
    If (data.enumValue is ddlDP.getItemAt (intLoop). HeightID)
    {
    this.selectedIndex = intLoop;
    break;
    }
    }
    }
    ]]>
                

             

               

              

             

            

           

       

    If this post answers your question or assistance, please mark it as such.

    Thank you

    Jean Claude Chari

  • How can I change the features of the DropDownList control?

    Hello world. I want to change the DropDownList labelButton - the button which, when is knocked open the content of the list. I want to replace the empty space with a search form. User will be asked comes from the content of the DropDownList control when he types in the letters or words that match those of content. It is like a regular search but with DropDownList features and its content using results. I have no idea where to start-I already looked through DropDownListSkin and DropDownListSkinBase but can't find anything that could help.

    Any ideas on that?

    Any help is really appreciated!

    DropDownList not ' let type you in stuff not in the list.  Ensure that you

    you don't want a ComboBox?

    You should be able to change the skin to remove the button and call open()

    When the.  You'll probably need to override management and the keyboard

    Well.

  • How to disable scrolling on the touchpad on a series Satellite?

    How to disable scrolling on the right side of the mouse?
    It drives me crazy. Just want the cursor but cannot see anything in the control panel.

    This option you can find in the advanced options of the mouse.
    Control Panel > mouse properties > device settings and if you have Synaptics driver click on settings. You will find the option of virtual scrolling.

    Just remove the check mark in front of the horizontal and vertical scrolling options, and it will be OFF.

  • How to disable location under the privacy services? My switch is freezed help kindly

    How to disable location under the privacy services? My switch is freezed help kindly

    Try disabling "Find my iPhone" in iCloud settings first.

  • How to disable him drag the text selected for searching the Web?

    How to disable him drag the text selected for searching the Web?

    Hmm, I did not forward. This is a new tab page with nothing to do with what you were dragging?

    I wonder if this might be a feature of one of your extensions. You can see their and disable/remove those that are not essential or unrecognized, here:

    Firefox orange (or the Tools menu) button > addons > Extensions category

    If you disable the extensions, usually a link will appear above at least one of them to restart Firefox. You can complete your work on the tab and click one of the links in the last step.

    If there is no difference, you could test mode without failure of Firefox - which is a standard diagnostic tool in order to avoid interference by extensions (and some custom settings). More info: questions to troubleshoot Firefox in Safe Mode.

    You can restart Firefox in Mode safe help

    Help > restart with disabled modules

    In the dialog box, click on 'Start mode safe' (not Reset)

    Any difference?

  • How to disable IPV6 for the LOOPBACK address in windows vista

    Hi all

    I have problems in ASP.NET when running any site due to IPV6 alias for the loopback address

    So I need to know how to disable IPV6 for the LOOPBACK address in windows vista

    Help, please

    http://www.lboro.AC.UK/it/Vista/IPv6.html

    There is a record for this difficulty to the bottom of the page above for Tunnel and loopback interfaces...

  • Windows Live Movie Maker 2011 - how to remove items from the recent projects list

    Windows Live Movie Maker 2011

    I have duplicates on my list of recent projects.

    How to remove items from the numbered list of recent projects?  What are the (thumb)

    bugs used for?  Thank you.

    Hello

    The question you have posted is related to Windows Live Movie Maker and would be better suited in the Windows Live Solution Center. Please visit the link below to find a community that will provide the best support.

    http://www.windowslivehelp.com/product.aspx?ProductID=5

    Amrita M

    Microsoft Answers Support Engineer

  • Please advice how to disable and enable the sequence.

    Database 11.2.0.2
    OPERATING SYSTEM: AIX 6.1
    Please advice how to disable and enable the sequence.
    Kind regards
    Nathalie

    NATHALIE wrote:
    Database 11.2.0.2
    OPERATING SYSTEM: AIX 6.1
    Please advice how to disable and enable the sequence.
    Kind regards
    Nathalie
    huh?

    How can I ask a question in the forums?
    SQL and PL/SQL FAQ

    When all else fails, read the instructions very well. ACTIVATE & are documented (or not)

    http://docs.Oracle.com/CD/E11882_01/server.112/e26088/statements_2012.htm#SQLRF00817

    -----------------------------------------------------------------------------------------------------------------------------------------

    Thank you guru I'll follow your instructions...

    If Google also giving the same statement then not more GURUS!

  • How to identify items on the checklist 'Exceptions' in the firewall of Windows XP?

    I have 40 points listed on the 'Exceptions' list Windows XP firewall. Of those, there are 24 which can be easily identified as being for use with software installed and utility.  I have 14 items listed with a term somewhat vague, called 'Services '.  I checked the lists of these TCP ports on the internet and I found that 5 are called or classified as 'no '.  Others have names that do not match what I have installed on my computer. such as dynamic and/or Private Party, Synapse non HTTPS, NUTS Bootp Server instantiates zero - control messaging, CosmoCall Universe Communications Port 2, ATI Sharp logical engine, System DVT and SecureSight Event Logging Server Port.  The others are DCOM (135), UPnP infrastructure and they are often referred to a being obsolete, according to various sources online.
    It should be our responsibility as users of computers and/or administrators to use measures to protect our operating systems using programs antivirus and antispyware up-to-date and ensuring that our systems and other operating software are updated regularly.  Thing that many of us can forget how our firewall settings are configured, including which are checked on our firewall lists 'Exceptions '.  Sometimes, you may need to remove a list control item because the software to which it applies is no longer installed or when a reliable source online checks as a checklist item is obsolete and can be deleted safely.  Unfortunately, it is not enough on line information to correctly identify some of these Firewall Exceptions as course, still being in service and for the legitimate transfer information.  There are several Exceptions to the Services on my computer that will eventually be rechecked when Windows is restarted by two programs (svchost.exe and another that I have not yet identified). How do we identify each function as legitimate?
    We have a lot to deal with when we protect our information.  Spyware, virus, worms, Root Kits and even our own programs and settings can affect the safety of our computers.  He arrived at a point where we have to develop software better which will keep a record of each file is added, changed or removed from our operating systems, while they are carefully parsed for signs to be used as a form of Malware. Using antivirus and antispyware programs, alone may not be enough protection. Our firewall settings are equally important.  We can not simply block all exceptions in the firewall, because we need to have ports open for software, monitoring of maintenance programs, email and security programs.  The big problem is to identify who is who and what they are supposed to do when they are vaguely defined as 'Services' how to determine who is who, and that one can be deleted safely?

    Well,.

    If I were in your shoes, I wouldn't have kept all programs except the default (not same remote connection or sharing as I don't use them). For others he added as exceptions, I would have checked them on: Microsoft.com and msdn.microsoft.com. If the programs are associated with MS, you will always get an answer. If there is no answer or if I'm in doubt, I have it deletes from the list of exceptions.
    Finally, if any program is affected by this and creates the connection problem, I would have added it to the exceptions. Other, I would allow in Exceptions.
    THE RULE IS TO REFUSE ANY PROGRAM THAT YOU DO NOT KNOW, AND IF YOU HAVE ANY DOUBTS. IF YOU EXPERIENCE ANY PROGRAM, CREATE PROBLEMS, YOU CAN ALWAYS ADD IT LATER.
    --
    Best regards
    DreamsCentral
    Twitter: @DreamsCentral
    LinkedIN: Linkedin.com/in/DreamsCentral
    Signed: Sunday 14 March, 2010, 14:46:38 IST
  • Qosmio X 770 - 11 c - how to disable on board the speakers when you use Line Out?

    Hello

    Is it possible to disable on board to intervene when the output line is used.

    Currently, if I plug in a cable to the socket of hadphone and choose alignment on the realtek Control Panel, sound is output line out as expected, but also through the internal speakers.

    Is it possible to stop this and don't have sound out through the output line?

    Thank you

    Graeme

    If you want to hear his helmet only you should choose option helmet.
    Disconnect the cable and reconnect it. When you see the small window on the screen where you can choose between the headphones and output line options choose headphones and you'll hear on external display only.

    In case you have disabled this pop-up dialog box you can activate it manually. Open the Realtek Manager connect the external device and when you see active point black on the right side make double click here and change the settings.

  • How to highlight all of the text control / seeing?

    I need a VI, just by pressing a button I could selects all the text in the control or the indicator to be able to copy then pressing CTRL + C.

    I tried to play with the property with selection of startup, select the end node, but no results.

    Also did not find any documentation or examples on how to highlight the text in the indicator.

    Could someone help with this?

    Any tips/tip much appreciated.

    Thanks in advance.

    Help for 'selection' mentions that you have to set the Focus to the first control.

    There is also a System method to copy a string into the system Clipboard.

    Tone

  • How can move items in the queue of 1 printer to another

    the title is the question... There are 2 printers put in place, just one, the disposable items in the queue and I want to move them.

    Jobs that are already in the queue are files that were produced by the printer driver and therefore include the printer controls that are specific to this printer.  Directing to the queue print on a second printer will only work if the second printer can correctly interpret the commands to the printer to be the first printer.

    If the second printer is of the same type as the first, the simplest method is to temporarily redirect the port assigned to the second printer.

    1. Go to printers and faxes
    2. Right-click on the icon for the 'good' printer and select Properties, then click the Ports tab
    3. Scroll the list of ports and make a note of the port to which the 'good' printer is made (one with a check) click on Cancel to close the Properties dialog box
    4. Right-click on the "disposable" printer icon, select Properties, and then click the Ports tab
    5. Make a note of the port which is checked, uncheck it and check the port that you noted in step 3.
    6. Click OK

    If the printers are not identical models, but at least the same type (laser, inkjet, matrix), it can work.  The closest to the printers are, it is likely that the print job prints correctly.

  • How to disable access to the cd player while windows is locked.

    Hello

    Does anyone know it's possible to disable access to the cd/dvd drive while windows is locked?

    That is, I would like to press Ctrl + alt + delete to lock my pc, then while I'm away, someone presses the eject button on my cd player and it will not eject.

    I have looked in device, properties of D: drive management, security settings, etc., but have been unable to find such a control to this day.

    Any help on this is greatly appreciated.

    Kind regards

    J

    Hi JC_226,

    This isn't the Windows feature. Can not disable access to the cd player while windows is locked. However, there is an option to disable the CD/DVD device. To do this, you can follow these steps:
    a. Click Start, click Run, type devmgmt.msc, and then click ok.
    b. in the list of objects, expand CD/DVD players.
    c. right-click on the sub element and click on disable.
    d. follow the instructions in the wizard to disable the device.

    Important: If you disable a device that is required to start the system, such as your floppy drive or CD-ROM/DVD-ROM drive, these devices will not work, and your system might not start.
     
    For more information, see disable a device

    Visit our Microsoft answers feedback Forum and let us know what you think.

Maybe you are looking for

  • LaserJet 1022: Wireless adapter for 1022?

    Is there an adapter to allow printing wireless with a 1022?

  • Update XP SP2 SP3?

    I'm running XP SP3 home page. Recently, I get an automatic Windows Update message that a 2007 SP2 update is ready for download and installation. Is that what sounds good since I installed SP3?Thanks for your comments.Andy

  • Default system disk insert boot disk and press enter

    A few days I have installed additional return 2 GB ddr2 ram on my pc and a graphics card. My c: drive had only 700MB left. Then I turned off my PC. The next day, when I turn on my pc it shows the disk boot failure insert system disk and press ENTER.

  • Connection Error 1120 ACS cisco acs 5.0 web gui

    Hi all I installed the unit acs 1120 as follows entered in the installation in console mode command aiinstalle licensevia gui mode But when I access the gui mode it disconnect regularly When I ping ping is successful and shows life 128 but after some

  • Precision M70, just upgraded to Windows 7, now my sound driver does not running.

    Yesterday I upgraded my laptop Precision M70 in Windows XP, Windows 7. But it seems that my audio driver is not compatible with Windows 7. I checked on the website of the manufacturer of my computer, Dell.com for an update. But none of the drivers fo