All, I am trying hard to get this simple thing done.  When i change
the header combobox, all the combobox in that group should be updated
with the same value as that of selected header combo box

Please let me know if there is any


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute" initialize="init()" viewSourceURL="srcview/
index.html" >
        <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"; width="100%">
                <mx:Panel width="100%" xmlns:mx="http://www.adobe.com/2006/mxml";
creationComplete="summaryResponse()" height="100%">
                        <mx:HBox horizontalAlign="center" width="100%" 
horizontalGap="0">
                                <mx:VBox verticalGap="1" 
horizontalAlign="center" width="100%"
height="100%">
                                        <mx:Script>
                                                <![CDATA[
                                                        import 
mx.collections.ArrayCollection;
                                                        import 
mx.collections.HierarchicalData;
                                                        import 
mx.controls.Alert;
                                                        import 
mx.controls.ComboBox;
                                                        import 
mx.core.UIComponent;
                                                        import 
mx.events.ListEvent;

                                                        public var detailedXML 
: XML =
                                                                <response 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance">
                                                                  <frrview 
source="frrView">
                                                                        
<frrGroup>
                                                                          
<groupName>A</groupName>
                                                                          
<cdoDocumentExt>
                                                                                
<FacilityFormVO source="1001662151:461682">
                                                                                
        <facilitySummary>
                                                                                
                <frr>4-</frr>
                                                                                
        </facilitySummary>
                                                                                
</FacilityFormVO>
                                                                          
</cdoDocumentExt>
                                                                          
<cdoDocumentExt>
                                                                                
<FacilityFormVO source="1001662151:461682">
                                                                                
        <facilitySummary>
                                                                                
          <frr>3-</frr>
                                                                                
        </facilitySummary>
                                                                                
</FacilityFormVO>
                                                                          
</cdoDocumentExt>
                                                                         
<cdoDocumentExt>
                                                                                
<FacilityFormVO source="1001662151:461682">
                                                                                
        <facilitySummary>
                                                                                
          <frr>2-</frr>
                                                                                
        </facilitySummary>
                                                                                
</FacilityFormVO>
                                                                          
</cdoDocumentExt>
                                                                        
</frrGroup>
                                                                        
<frrGroup>
                                                                          
<groupName>B</groupName>
                                                                          
<cdoDocumentExt>
                                                                                
<FacilityFormVO source="1001662151:461682">
                                                                                
        <facilitySummary>
                                                                                
                <frr>2-</frr>
                                                                                
        </facilitySummary>
                                                                                
</FacilityFormVO>
                                                                          
</cdoDocumentExt>
                                                                          
<cdoDocumentExt>
                                                                                
<FacilityFormVO source="1001662151:461682">
                                                                                
        <facilitySummary>
                                                                                
          <frr>3-</frr>
                                                                                
        </facilitySummary>
                                                                                
</FacilityFormVO>
                                                                          
</cdoDocumentExt>
                                                                         
<cdoDocumentExt>
                                                                                
<FacilityFormVO source="1001662151:461682">
                                                                                
        <facilitySummary>
                                                                                
          <frr>4-</frr>
                                                                                
        </facilitySummary>
                                                                                
</FacilityFormVO>
                                                                          
</cdoDocumentExt>
                                                                        
</frrGroup>
                                                                  </frrview>
                                                                </response>;

                                                        [Bindable]
                                                        public var finalFRRData 
: ArrayCollection = new ArrayCollection
([
                                                                {label:'', 
value:''},
                                                                {label:'1', 
value:'1'},
                                                                {label:'2+', 
value:'2+'},
                                                                {label:'2', 
value:'2'},
                                                                {label:'2-', 
value:'2-'},
                                                                {label:'3+', 
value:'3+'},
                                                                {label:'3', 
value:'3'},
                                                                {label:'3-', 
value:'3-'},
                                                                {label:'4+', 
value:'4+'},
                                                                {label:'4', 
value:'4'},
                                                                {label:'4-', 
value:'4-'}
                                                        ]);


                                                        [Bindable]
                                                        public var 
hd:HierarchicalData;


                                                        private function 
summaryResponse(): void{
                                                                var 
facilityXML:XMLList;
                                                                var 
xmlString:String =  detailedXML.frrview;

                                                                facilityXML = 
new XMLList(XML(xmlString));

                                                                hd = new 
HierarchicalData(facilityXML.frrGroup);
                                                                
hd.childrenField ="cdoDocumentExt";
                                                                
custInfoAdg.dataProvider = hd;
                                                                
custInfoAdg.dataProvider.refresh();
                                                        }
                                                ]]>
                                        </mx:Script>

                                        <mx:AdvancedDataGrid  id="custInfoAdg"  
width="100%" height="400"
displayItemsExpanded="true" sortableColumns="true"
sortExpertMode="true" >
                                                <mx:dataProvider>
                                                        <mx:HierarchicalData 
source="facilityXML"/>
                                                </mx:dataProvider>
                                                <mx:columns>
                                                        
<mx:AdvancedDataGridColumn headerWordWrap="true" width="100"
fontFamily="Arial" dataField="groupName" fontSize="11" headerText =
"Group Name"/>
                                                        
<mx:AdvancedDataGridColumn headerWordWrap="true" width="70"
fontFamily="Arial"  fontSize="11"  headerText = "Test Drop">
                                                                
<mx:itemRenderer>
                                                                        
<mx:Component>
                                                                                
<mx:VBox horizontalAlign="center">
                                                                                
        <mx:Script>
                                                                                
                <![CDATA[
                                                                                
                        import mx.controls.Alert;
                                                                                
                        import mx.events.ListEvent;
                                                                                
                        override public function set data(value:Object):void{
                                                                                
                                super.data = value;
                                                                                
                                try{

                                                                                
                                        var val:String = 
data.facilitySummary.frr;
                                                                                
                                        for (var i:int = 0; i <
facilityFRR.dataProvider.length; i++) {
                                                                                
                                                if ( data.facilitySummary.frr ==
facilityFRR.dataProvider[i].value) {
                                                                                
                                                        
facilityFRR.selectedIndex = i;
                                                                                
                                                        break;
                                                                                
                                                }
                                                                                
                                        }
                                                                                
                                }catch(error: Error){}
                                                                                
                        }

                                                                                
                        protected function
facilityFRR_changeHandler(event:ListEvent):void
                                                                                
                        {
                                                                                
                                Alert.show("hi");
                                                                                
                        }
                                                                                
                ]]>
                                                                                
        </mx:Script>
                                                                                
        <mx:ComboBox id="facilityFRR"
change="facilityFRR_changeHandler(event)"
dataProvider="{outerDocument.finalFRRData}" width="70"/>
                                                                                
</mx:VBox>
                                                                        
</mx:Component>
                                                                
</mx:itemRenderer>
                                                        
</mx:AdvancedDataGridColumn>
                                                </mx:columns>
                                        </mx:AdvancedDataGrid>
                                </mx:VBox>
                        </mx:HBox>
                </mx:Panel>
        </mx:Canvas>
        </mx:Application>

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