3 Replies Latest reply on Jan 12, 2011 10:20 AM by kevinklin

    What's wrong with this or Hero DataGrid blues

    Zolotoj Level 3

      I am working with Hero DataGrid.To say it's meant to be hard is to to say nothing.

      Without going into what's not working here is some source code and its run time values:

       

      Code #1.

      owner.selectedItem[column.dataField] = 1;
      

      Message from compiler: 1119: Access of possibly undefined property selectedItem through a reference with static type flash.display:DisplayObjectContainer.   
      My genious thought: You need to cast it into Grid:

      Code #2:

      Grid(owner).selectedItem[column.dataField] = 1;
      

      Aha! No compiler error. Who's tha man?

      So far, so good. Letr's run it but suspend at the line:

      Grid(owner).selectedItem[column.dataField] = 1;

      Debugger will show:

      "Grid(owner).selectedItem"    null  Why????????

      but:

      owner.selectedItem:

      <consistpersonnel1>
        <id>
          0
        </id>
        <header_id>
          0
        </header_id>
        <person_id>
          2
        </person_id>
        <name_id>
          0
        </name_id>
        <worknum/>
      </consistpersonnel1>

       

      So, to Grid or not to Grid?