4 Replies Latest reply on Apr 28, 2008 5:11 PM by ntsiii

    assign dataprovider that bound to a run-time variable value

    biwood
      var selectedItem:String="A";
      public var profitXml:XML =
      <root>
      <txn>
      <date>2007-11-09</date>
      <A>98.25/1.75/0</A>
      <B>99.99/.01/0</B>
      </txn>
      <txn>
      <date>2007-11-12</date>
      <A>99.4/.6/0</A>
      <B>99.99/.01/0</B>
      <C>99.53/.47/0</C>
      </txn>
      </root>;

      Assume that I have a datagrid that uses profitXml as the dataprovider, how do i select only item "A" for the datagrid? It doesn't seem to be possible to do something like: dg.dataprovider = profitXml.txn.{selectedItem}