6 Replies Latest reply on Jul 15, 2011 8:50 AM by Haibo17

    How to map String[][] into DataGrid

    Haibo17

      Hi;

       

      This is probably a dummy question.

       

      I will get a String[][] by calling one of my RemoteObject's method. Now I want to put it into a DataGrid.

       

      The String[][] looks like something like this:

       

      [[Admin2, User], [Utility, Application], [Admin1, User]].

       

      here is my datagrid

       

      <mx:DataGrid width="100%" height="100%" id="datagrid">

      <mx:columns>

      <mx:DataGridColumn headerText="Name"/>

      <mx:DataGridColumn headerText="Type"/>

      </mx:columns>

      </mx:DataGrid>

       

      I tried

       

      datagrid.dataProvider = event.result;

       

      It does not work.

       

      Any idea? Thanks!!!!