title: how to filter a column in datagridview imported from excel file
body: <p>For example I have a datagridview1 with data imported from a excel file and there are 12 columns: date, Name, Activity, Project,time, comment,ect. and 1000 row.
  What I want to do is to filter only all with the Project name in project column.
  for example I have support as a (Projectname) I want to show all columns filtyring by support rows.</p>
  
  <p>I have combobox to select which column I need to filter it( e.g Project) here,
  I tried with this code but it dose not work.</p>
  
  <pre><code>  private void ComboBox1_SelectedIndexChanged(object sender, EventArgs e)
    {
      string projektItem = comboBox1.Items[comboBox1.SelectedIndex].ToString();
      if (projektItem == "Project") {
          foreach (DataRow dataRow in dataGridView1.Rows)
          {
              StringBuilder filter = new StringBuilder();
  
              for (int i = 0; i &lt; dataGridView1.Columns.Count - 1; i++)
              {
                  filter.Append(dataRow[i].ToString());
                  filter.Append("\t");
              }
              dataGridView1.DataSource = filter.ToString();
          }
  
      if (projektItem == "Name") {
      }
      if (projektItem == "Aktivity") {
      }
  }
  </code></pre>