ive checked the contents returned and they are exactly the same as the
data that populates the grid when the application loads however the only
difference between the two is that the first call to update the grid on
application load has this line


dataProvider = new ArrayCollection ( ArrayUtil.toArray(evt.result) ); //
same as: evt.result.toString();

  please  look at the code below the first function populates the
datagrid on the first run

while the second function returns the results of the added item.

  private function resultHandler(evt:ResultEvent):void
             {
                 dataProvider = new ArrayCollection (
ArrayUtil.toArray(evt.result) ); // same as:evt.result.toString();
             }


public function sendResultHandler(evt:ResultEvent):void
             {

                dataProvider.addItem(ArrayUtil.toArray(evt.result));
                dataProvider.refresh();
             }



the thing is if i change the second function to:

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

it actually populates the datagrid with the last added item however in
the process(as i said earlier) it also wipes everything off the array
collection becuase of the first line in that function.
what i dont understand is the blank row that appears...sorry if my
explenation is a bit confusing im still new to this as wel






Reply via email to