0 Replies Latest reply on Jul 9, 2007 1:06 AM by Noppadon Sodram

    How to specify dateField in DataGridColumn by use it's attribute

    Noppadon Sodram Level 1
      How to specify dateField in DataGridColumn by use it's attribute ( For example use attribute "name" and "table" to specity each dataField)
      Thanks any idea.

      <mx:HTTPService id="myEmployee" url=" http://localhost/test/myEmployee.xml" useProxy="false" method="POST"/>

      myEmployee.xml :
      <?xml version="1.0" encoding="utf-8"?>
      <database>
      <table>
      <record>
      <field name="auto_id" table="employee">2</field>
      <field name="id" table="employee">2</field>
      <field name="name" table="employee"></field>
      <field name="first_name" table="employee">James</field>
      <field name="middle_name" table="employee">Francis</field>
      <field name="last_name" table="employee">Ryan</field>
      <field name="id" table="department">1</field>
      <field name="name" table="department">Marketing</field>
      </record>
      </table>
      </database>

      <mx:DataGrid dataProvider="{myEmployee.lastResult.database.table.record}" width="100%">
      <!--////////////////////////////////////////////////////////////////////////////////
      <mx:columns>
      <mx:DataGridColumn dataField="field"/>
      <mx:DataGridColumn dataField="field"/>
      <mx:DataGridColumn dataField="field"/>
      <mx:DataGridColumn dataField="field"/>
      <mx:DataGridColumn dataField="field"/>
      <mx:DataGridColumn dataField="field"/>
      </mx:columns>
      ////////////////////////////////////////////////////////////////////////////////-->
      </mx:DataGrid>