0 Replies Latest reply on Aug 14, 2006 8:06 AM by mwiley63

    Pushing items to array for a datagrid

    mwiley63 Level 1
      I am setting up a datagrid, that has column names week1, week2, week3, etc.
      I am looping through a 2D array and pushing it into this datagrid, currently I have to do this:
      for(condition){
      array_matrix.push({week1: <data>, week2: <data>, week3: <data>, .... });
      }

      This would be easier if I could use 2 for loops that are nested to index the column name, is this possible? Can I use a variable name to scope the column name? How would I do that? Or could I just use the index like week , flash seems to look for a column name week whenever I do that