Anil,
You can use Custom Combo box item Renderers for this ...

SampleApp.mxml

<?xml version="1.0" encoding="utf-8"?>
<!--
http://blog.flexexamples.com/2007/09/25/creating-a-custom-combobox-item-renderer-in-flex/-->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
        layout="vertical"
        verticalAlign="top"
        backgroundColor="white">
        <mx:Script>
         <![CDATA[
         import mx.collections.ArrayCollection;
[Bindable]
            public var cards:ArrayCollection = new ArrayCollection(
                [ {label:"Apple", data:1},
                  {label:"Banana", data:2},
                  {label:"Cherry", data:2},
                  {label:"Tamarind", data:2},
                  {label:"Grapes", data:2},
                  {label:"Tomato", data:3} ]);

         ]]>
        </mx:Script>


    <mx:ComboBox id="comboBox"
            prompt="Please select a State..."
            dataProvider="{cards}"
            rowCount="3"
            itemRenderer="ComboBoxItemRenderer" width="200" />

</mx:Application>

ComboBoxItemRenderer.mxml

<?xml version="1.0" encoding="utf-8"?>
<!--
http://blog.flexexamples.com/2007/09/25/creating-a-custom-combobox-item-renderer-in-flex/-->
<mx:Button xmlns:mx="http://www.adobe.com/2006/mxml";
        enabled="{ (data.label == 'Banana' || data.label == 'Cherry') }"
        label="{data.label +  ' => Enable = ' + (data.label == 'Banana' ||
data.label == 'Cherry') }"
>
</mx:Button>

Hope this helps ....

-Sathish

On Tue, Nov 18, 2008 at 6:08 PM, Anil <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
>  Can any one suggest me in graying out some data in combo box.
>
>  Eg: Combo Box data will be having Apple, Banana, Tomato, Cherry,
> Tamarind, Grapes.
>       How can I grey out Banana and Cherry. I mean selection should
> be enabled on these data.
>
>  Any suggestions ???
>
> Thanks,
> Anil
>
>
> >
>


-- 
Warm Regards,
Sathish Kumar T

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to