You want to print all of the att_Name values but the problem is that everything inside is objects.  You’re going to need to do it differently.

 

function showAlert():Void

{

  var str:String = “”;

  for (var i:Number=0; i < lglDocLst.length; i++)

  {

     str += lglDocList[i].att_Name;

     if (i < lglDocLst.length – 1)

     {

       str += “, “;

     }

  }

  Alert.show(“MyValue: “ + str);

}

 

Matt

 

 


From: [email protected] [mailto:[email protected]] On Behalf Of sandip_patil01
Sent: Thursday, December 01, 2005 12:13 AM
To: [email protected]
Subject: [flexcoders] showing values inside datagrid when click on button outside

 


Hi All,


I have data grid populated with records from DB as,
<mx:DataGrid id="dGrid" dataProvider="{lglDocLst}">
  <mx:columns>
      <mx:Array>
        <mx:DataGridColumn headerText="Item Name"
columnName="att_Name" />
    </mx:Array>
  </mx:columns>
</mx:DataGrid>

where lglDocLst is values returned  from my Java class.
This works fine.In my datagrid its printing 2 values of att_Name.

Now I have a button outside datagrid as,
<mx:Button label="Show" click="showAlert()" />

when I click on this button I am printing alert as

function showAlert(){
      mx.controls.Alert.show("MyValue "+lglDocLst.att_Name);
   }

But this function printing undefined.
any suggestions will be appreciable.

Thx,
sandip p










--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to