title: AS3 datagrid - Hide a row
body: <p>I'm using 2 comboboxes to filter a dataGrid that has been populated via csv file. The first combobox filters the columns and works fine:</p>
  
  <pre><code>//Listener and function for when the Agreement ID is selected
  agreement_cb.addEventListener(Event.CHANGE, agreement);
  function agreement(event:Event):void 
  {
      //get the number of columns 
      var columnCount:Number = myGrid.getColumnCount();
  
      for (var i:int=0; i&lt;columnCount; i++)
      {
          myGrid.getColumnAt(i).visible = false;
      }
      var columnNumber:Number = agreement_cb.selectedItem.data;
      myGrid.getColumnAt(columnNumber).visible = true;
      myGrid.getColumnAt(0).visible = true;
      myGrid.columns[0].width = 200;
  }
  </code></pre>
  
  <p>But I can't find anything on how to get the same type of function to hide all of the rows except the one they select from the second drop-down (codes_cb). </p>
  
  <p>Any help is appreciated...</p>
  
  <p>UPDATE:</p>
  
  <pre><code>loadedData = myLoader.data.split(/\r\n|\n|\r/);
      loadedData.pop();
      for (var i:int=0; i&lt;loadedData.length; i++)
      {
          var rowArray:Array = loadedData[i].split(",");
          loadedData[i] = {"SelectAgreement":rowArray[0],"KSLTPROF0057":rowArray[1] .........};
      }
      loadedData.shift();
      myGrid.columns = ["SelectAgreement", "KSLTPROF0057", ......];
  
      import fl.data.DataProvider;
      import fl.controls.dataGridClasses.DataGridColumn;
  
      myGrid.dataProvider = new DataProvider(loadedData);
  </code></pre>