title: DataGridView Changing DataSource Dynamically
body: <p>Basically when I create this DataGridView I have this code to fill it up</p>
  
  <pre><code>public void fillDataGrid(IQueryable&lt;PatientInfo&gt; patients) {
  
              dgvMyPatients.DataSource = patients;
  
              dgvMyPatients.Columns["Pat_Last_Name"].DisplayIndex = 0;
              dgvMyPatients.Columns["Pat_First_Name"].DisplayIndex = 1;
              dgvMyPatients.Columns["Pat_Middle_Name"].DisplayIndex = 2;
              dgvMyPatients.Columns["Pat_First_Name"].HeaderText = "First Name";
              dgvMyPatients.Columns["Pat_Last_Name"].HeaderText = "Last Name";
              dgvMyPatients.Columns["Pat_Middle_Name"].HeaderText = "Middle Name";
  
          }
  
  public IQueryable&lt;PatientInfo&gt; showMyPatients() {
  
              DbClassesDataContext myDb = new DbClassesDataContext(dbPath);
  
              var patientInfo = from patients in myDb.PatientInfos
                                where patients.Phy_ID == physcianID
                                select patients;
  
              return patientInfo;
          }
  </code></pre>
  
  <p>So when I create my Object I just do this</p>
  
  <pre><code>fillDataGrid(showMyPatients());
  </code></pre>
  
  <p>But When I click a button I want to change its contents to something like in this query</p>
  
  <pre><code> private IQueryable&lt;PatientInfo&gt; searchPatient() {
  
          DbClassesDataContext myDb = new DbClassesDataContext(dbPath);
          var search = from myPatients in myDb.PatientInfos
                       where (myPatients.Pat_ID == patient_ID &amp;&amp; myPatients.Pat_First_Name.Contains(txtSearch.Text)) ||
                       (myPatients.Pat_ID == patient_ID &amp;&amp; myPatients.Pat_Last_Name.Contains(txtSearch.Text)) ||
                      (myPatients.Pat_ID == patient_ID &amp;&amp; myPatients.Pat_Middle_Name.Contains(txtSearch.Text))
                       select myPatients;
  
          return search;
      }
  </code></pre>
  
  <p>Then when I click my button It will do this, but it is not updating the datagrid why is that?
      fillDataGrid(searchPatient());</p>