6 Replies Latest reply on Mar 20, 2010 9:56 PM by Flex harUI

    Showing some columns from a collection (Datagrid)

    Aron manager Level 1



      I'm using amf to retrieve some records form a remote database. The result of the remote operation is assigned to a datagrid dataprovider member. This works perfectly. But I need to just show some columns from this result not all. How can I do this? I have tried something like this without luck:


              //Assign data



              //Clean columns and readd just the ones we need


              //Column header, dataField
              var dgColumns:Array=["Id","idUsuario",


                  this.columns=new Array();           
                  var i:int=0;
                      var col:DataGridColumn=new DataGridColumn(dgColumns[i++]);


      I have seen there's a visible property for the column, don't know if it is a good option to set it to false to all columns I don't want to be seen.


      Thanks in advance,