1 Reply Latest reply on Aug 12, 2007 4:08 PM by Newsgroup_User

    Newbie Question: Dynamic mx:text

    isleta13
      Hello,

      I am creating a page with 3 Datagrid columns on the left side and on the right side I want to dump out the rest of the record information.

      <mx:HTTPService id="listOrgs"
      url=" http://localhost:3000/organizations/list"
      useProxy="false"/>

      <mx:DataGrid id="orgs" x="40" y="85" width="98%"
      height="98%"
      dataProvider="{listOrgs.lastResult.organizations.organization}">
      <mx:columns>
      <mx:DataGridColumn headerText="Name" dataField="name" width="250" />
      </mx:columns>
      </mx:DataGrid>

      <mx:Panel x="764" y="10" width="250" height="500" layout="absolute" title="Details" paddingTop="2" paddingBottom="2"
      paddingLeft="2" paddingRight="2">
      <mx:VBox paddingTop="1" paddingBottom="1"
      paddingLeft="1" paddingRight="1">

      <mx:Text width="225" height="20" htmlText="{orgs.selectedItem.name}"/>
      <mx:Text width="225" height="100" htmlText="{orgs.selectedItem.description}"/>
      <mx:Text width="225" height="25" htmlText="{orgs.selectedItem.external_link}"/>
      </mx:VBox>
      </mx:Panel>


      This works fine with one tab, but if I change tabs, say go to a tab named programs, I do I tell the mx:text field to switch over? I imagine I want a this.id or something like that, but I'm pretty new at this.

      Thanks!
        • 1. Re: Newbie Question: Dynamic mx:text
          Level 7
          http://flexapps.macromedia.com/flex2beta3/explorer/explorer.html
          Take a Look the samples for Datagrid. I hope that's what you want it.
          Rgds

          JFB


          "isleta13" <webforumsuser@macromedia.com> wrote in message
          news:f9o112$8jr$1@forums.macromedia.com...
          > Hello,
          >
          > I am creating a page with 3 Datagrid columns on the left side and on the
          > right
          > side I want to dump out the rest of the record information.
          >
          > <mx:HTTPService id="listOrgs"
          > url=" http://localhost:3000/organizations/list"
          > useProxy="false"/>
          >
          > <mx:DataGrid id="orgs" x="40" y="85" width="98%"
          > height="98%"
          >
          > dataProvider="{listOrgs.lastResult.organizations.organization}">
          > <mx:columns>
          > <mx:DataGridColumn headerText="Name" dataField="name"
          > width="250" />
          > </mx:columns>
          > </mx:DataGrid>
          >
          > <mx:Panel x="764" y="10" width="250" height="500" layout="absolute"
          > title="Details" paddingTop="2" paddingBottom="2"
          > paddingLeft="2" paddingRight="2">
          > <mx:VBox paddingTop="1" paddingBottom="1"
          > paddingLeft="1" paddingRight="1">
          >
          > <mx:Text width="225" height="20" htmlText="{orgs.selectedItem.name}"/>
          > <mx:Text width="225" height="100"
          > htmlText="{orgs.selectedItem.description}"/>
          > <mx:Text width="225" height="25"
          > htmlText="{orgs.selectedItem.external_link}"/>
          > </mx:VBox>
          > </mx:Panel>
          >
          >
          > This works fine with one tab, but if I change tabs, say go to a tab named
          > programs, I do I tell the mx:text field to switch over? I imagine I want a
          > this.id or something like that, but I'm pretty new at this.
          >
          > Thanks!
          >
          >