0 Replies Latest reply on Apr 29, 2006 5:21 PM by cecropin

    Strange DataGrid behavior

      I'm a Flex beginner so this could be me at fault or Flex 2. I've got a datagrid as defined below. What's odd is I'm trying to use a tiered architecture so I have a business delegate that returns an arraycollection of value objects. If I bind the datagrid to the arraycollection, the data displays correctly and other functionality such as adding and editing the elements of the arraycollection works, but when I mouse over the grid only the last item in the grid flickers. If I bind to the static array collection that's been commented out then the mouse over effects works like it's suppose to and the row I'm hovering over will be lit.

      I've searched and searched the web and forums but have never seen any reference to such a problem. Any suggestions would be greatly appreciate.


      import com.myco.cit.business.CalendarEntryDelegate;
      import mx.collections.ArrayCollection;

      [Bindable] var gridEntries:ArrayCollection;
      var delegate : CalendarEntryDelegate;

      public function applicationInit(): void {
      delegate = new CalendarEntryDelegate();
      gridEntries = delegate.getEntries();
      //gridEntries = delegate.getEntries();
      mx.controls.Alert.show("Event called.\n" + "length = " + gridEntries.length);


      <mx:DataGrid x="25" y="105" percentWidth="95" id="calendarGrid"
      editable="true" dataProvider="{gridEntries}">
      <mx:DataGridColumn headerText="Date" dataField="date" width="50" />
      <mx:DataGridColumn headerText="Type" dataField="type" width="50" />
      <mx:DataGridColumn headerText="Comments" dataField="comments"
      width="150" />
      <mx:Object date="4/1/2006" type="OOO"
      comments="Vacation" />
      <mx:Object date="4/5/2006" type="Partial"
      comments="Morning Meeting" />