1 Reply Latest reply on Jan 5, 2011 10:53 AM by Gregory Lafrance

    Spark DataGrid

    Zolotoj Level 3

      I am trying to access a column object using the column collection:

      var col:GridColumn = personnel.columns[0];

      But I am getting an error:

      Property 0 not found on mx.collections.ArrayList and there is no default value.

      Here is my DataGrid:

      <s:DataGrid requestedRowCount="1"
                                  id="personnel" rowHeight="23">
                          <s:columns>
                              <s:ArrayList>
                                  <s:GridColumn dataField="person" headerText="Person">
                                      <s:itemRenderer>
                                          <fx:Component>
                                              <s:GridItemRenderer>
                                                  <s:layout>
                                                      <s:VerticalLayout paddingLeft="2"
                                                          verticalAlign="middle"/>
                                                  </s:layout>
                                                  <modulecode:comboItemRendererDataGrid>                                           
                                                  </modulecode:comboItemRendererDataGrid>
                                              </s:GridItemRenderer>
                                          </fx:Component>   
                                      </s:itemRenderer>
                                  </s:GridColumn>   
                              </s:ArrayList>                   
                          </s:columns>
                      </s:DataGrid>

       

      What am I doing wrong?

       

      Thanks