That's certainly interesting. I would try and debug the result of:

ArrayUtil.toArray(evt.result));

To make sure the data is the correct type, and columns named correctly. Just a 
stab in the dark. I know the technique does work as I use it in my app - but 
you might just need to check your return values and make sure they are what you 
expect.

Cheers,
Adam


  ----- Original Message ----- 
  From: munene_uk 
  To: [email protected] 
  Sent: Sunday, February 11, 2007 4:44 AM
  Subject: [flexcoders] Re: Refreshing Datagrid from pop up window



  well im back with another problem...

  i followed your example

   private function sendResultHandler(evt:ResultEvent):void
              {
                dataProvider.addItem(ArrayUtil.toArray(evt.result));
     dataProvider.refresh();
                   
              }

  however all it does is add a blank result to the datagrid but once i refresh 
using the browser the  newly updated row appears

  interstingly i tried this:

   private function sendResultHandler(evt:ResultEvent):void
  {
   dataProvider = new ArrayCollection ( ArrayUtil.toArray(evt.result) );
   dataProvider.addItem(ArrayUtil.toArray(evt.result));
   dataProvider.refresh();
                   
  }

  obviously this completely wipes the data currently displayed on the datagrid 
but this acutally displays the newly updated item.

  this is how i've declared my data provider

  [Bindable]
  public var dataProvider:ArrayCollection = new ArrayCollection();



  any ideas? anyone?




   

Reply via email to