Hello All,

Thanks for the quick response. Please find attached the code for your
reference. If we check the last row, the problem would be understood
better, when we change it to TBD from N/A.

main app
-------------
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute" xmlns:stax="Stacks.*"  height="100%" width="100%"
xmlns:local="*">
        <mx:Script>
                <![CDATA[
                        import mx.collections.ArrayCollection;

                        [Bindable]
                        public var dp:ArrayCollection =  new ArrayCollection([
{Category:"0",Risk:"Y"} ,{Category:"1",Risk:"Y"},{Category:"1",Risk:"N/
A"}
        ]);

        ]]>
</mx:Script>
        <mx:Panel label="Report" title="Report" height="100%" width="100%"
styleName="Panel">
                <mx:AdvancedDataGrid width="200" height="200" id="dProvider1"
dataProvider="{dp}"
                        editable="true" borderThickness="2" headerHeight="40"
headerWordWrap="true" wordWrap="true" >
                                <mx:columns>
                                <mx:AdvancedDataGridColumn dataField="Category"
                                                headerText="Deliverable 
Category" width="50" editable="false"/>
                                <mx:AdvancedDataGridColumn dataField="Risk"
                                                headerText="Risk(RYG)" 
width="50" editorDataField="selectVal"
itemEditor="checkBoxEditor"/>
                        </mx:columns>
                </mx:AdvancedDataGrid>
                </mx:Panel>
</mx:Application>



checkBoxEditor.mxml  (Item editor)
----------------------------
<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml";
creationComplete="initMe()" >
<mx:Script>
        <![CDATA[
                import mx.collections.ArrayCollection;

                [Bindable]
                public var selectVal:String = "";

                [Bindable]
                private var typeRisk:ArrayCollection = new
ArrayCollection([{type:"TBD"},
                                                                                
                 {type:"N/A"},{type:"Y"},{type:"G"} ]);
        private function initMe():void
            {
                selectVal = data.Risk;
                for (var i:int =0;i<typeRisk.length; i++) {
                        if (typeRisk[i].type == data.Risk) {
                                Combo.selectedIndex = i;
                        }
                }
            }
            private function selectionChange():void
                {
                        selectVal = Combo.selectedItem.type;
                }
        ]]>
</mx:Script>
<mx:ComboBox id="Combo" dataProvider="{typeRisk}" labelField="type"
change="selectionChange()"/>
</mx:HBox >

On Mar 30, 7:46 pm, [email protected] wrote:
> Hi Bala,
> If you submit sample code, it makes it easier to help you and understand
> your needs.
> This usually helps expedite the solution among our group.
> If you can't supply sample code, a screen shot of the issue helps as well.
>
> Thanks
> Edwin
>
>
>
> On Tue, Mar 30, 2010 at 6:32 AM, Balki <[email protected]> wrote:
> > Hi.
>
> > Iam using a combo box as item editor and am rendering it dynamically
> > using action script. My requirement is simple.
> > a.) I have 3 values, Y, N and TBD. The default is TBD.
> > b.) When I click on the drop down, the TBD is visible at the
> > background of the drop down.
>
> > Not sure why this is happening and because of this, the look and feel
> > is not all that good.
>
> > Request your help to get rid of this problem.
>
> > Thanks
> > Bala
>
> > --
> > 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]<flex_india%2bunsubscr...@googlegrou­ps.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/flex_india?hl=en.- Hide quoted text -
>
> - Show quoted text -

-- 
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