0 Replies Latest reply on Jan 28, 2011 7:42 AM by kiran7881

    How to have control over Custom Item Renderer of DatGridColumn??

    kiran7881 Level 1

      Hi all

       

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" height="100%" width="100%">
        <mx:TabBar>
              <mx:dataProvider>
                  <mx:String>Alabama</mx:String>
                  <mx:String>Alaska</mx:String>
                  </mx:dataProvider>
          </mx:TabBar>
      <mx:DataGrid id="dataGrid"  height="2741" y="142" width="336">
              <mx:columns>
                          <mx:DataGridColumn  textAlign="right" itemRenderer="comps.Dam" />
              </mx:columns>
          </mx:DataGrid>
      </mx:Application>

      ============

      Dam.MXMXL

       

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%">

       

      <mx:Text text="MyData"/>
          <mx:VBox id="myvbox">
          <mx:Image source="images/canvas.png" />
          </mx:VBox>
      </mx:Canvas>

       


      Hi this is my code above.
      As you can see i am using Custom ItemRenderer inside DataGridColumn .

       

      If the Tab Alabama is clicked on TabBar  , i want to show the DataGrid ItemRenderer as it is .
      But if it has been selected as Alaska , i dont want to display the VBox .

       

      Please help me , i am strugling on this almost for  hours now