2 Replies Latest reply on Jan 27, 2011 9:29 PM by kiran7881

    How to show an Default Image in case of Image  src attribute is pointing to  null

    kiran7881 Level 1

      Hi ,

       

      I am displaying Images on to DataGrid by reading an XML File .
      This works fine if the Image src is prsent.
      Now my question is that sometimes the Image  src might be null , then in which case i need to
      display some default Image .

       

      <mx:HBox id="hBox">
      <mx:Image source="{rep.currentItem.@src}"/>
      </mx:HBox>


      <images>
      <image src="images/One.png" />
      <image src="images/Two.png"/>
      <image src=""/>
      </images>

       

      Please tell me as how to show an Default Image in case of Image  src attribute is null .

       

      Please share your ideas on this .

       

      Thanks in advance .