title: Filter DataGrid View Windows Form
body: <p>I have datagrid Veiw that i fill with a list like below:</p>
  <pre><code>var listPartner = db.BusinessPartnerRepository.GetSummeryDetailsOfPartner(txtFindFilter.Text);
          var listEvidence = db.Evidence.Get();
          var listDetail = db.EvidenceDetail.Get();
          var listCountry = db.Country.Get();
          var result = (from evidence in listEvidence
                        join detail in listDetail
                        on evidence.Id equals detail.EvidenceId
                        join countryname in listCountry
                        on evidence.CountryId equals countryname.Id
                        join partner in listPartner
                        on evidence.PartnerId equals partner.PartnerId
                        select new
                        {
                            evidence.TruckNo,
                            evidence.SerialNo,
                            DateShamsi = evidence.Date.ToShamsi(),
                            partner.PartnerFullName,
                            detail.Id,
                            detail.EvidenceId,
                            detail.MerchandiseName,
                            detail.weight,
                            detail.Unit,
                            detail.Discription,
                            countryname.CountryName
                        }).ToList();
          dgEvidenceList.AutoGenerateColumns = false;
          dgEvidenceList.DataSource = result;
  </code></pre>
  <p>And at the top of the datagrid, I have two combo boxes, the first of which contains the names of the datagrid columns(cmbColumnNames)
  and the second contains conditional operators (=,&gt;,&lt;,&gt;=,&lt;=,%)(cmbOprators)
  and i have textbox(txtFilter)
  Now I want to write a method to filter the data grid view when the user selects one of the column titles(cmbColumnNames) and selects the related operator(cmbOprators) and enters text into the text box.
  Thank you for your help, I am a beginner in this field.</p>