title: Show data in datagridview filtered by current date C#
body: <p>i have large number of rows in my database. when i tried to load all the data in to datagridview it getting stuck. i want to load data to datagridview that only related datetimepicker date. this is my current code </p>
  
  <pre><code>private void showdatagrid()
  {
      string constring = string.Format("datasource='{0}';username=uwadminview;port=3306;password=*****************;Connect Timeout=20000;Command Timeout=28800", dbserverip.Text);
      MySqlConnection conwaqDatabase = new MySqlConnection(constring);
      MySqlCommand cmdwaqDatabase = new MySqlCommand(" select * from waq115.loans ; ", conwaqDatabase);
  
      try
      {
          MySqlDataAdapter sda = new MySqlDataAdapter();
          sda.SelectCommand = cmdwaqDatabase;
          dbdataset = new DataTable();
          sda.Fill(dbdataset);
          BindingSource bsource = new BindingSource();
          bsource.DataSource = dbdataset;
          dataGridView1.DataSource = bsource;
          sda.Update(dbdataset);
      }
      catch (Exception ex)
      {
          MessageBox.Show(ex.Message);
      }
          conwaqDatabase.Close();
      }
  </code></pre>
  
  <p>then soon after i call this i again use a rowfilter event like this</p>
  
  <pre><code>private void filterdata()
  {
      DataView DV = new DataView(dbdataset);
      DV.RowFilter = string.Format("Convert(submittimestamp, System.String) LIKE '%{0}%'", adminviewDTP.Text);
      dataGridView1.DataSource = DV;
  }
  </code></pre>
  
  <p>but in this method performance is very bad when loading more than 9000 rows it getting stuck all the time. i want to method that directly query data from database only related  to today</p>
  
  <p>(users are daily update the database and they are insert more than 500 rows each day)
  (application still in a testing progress)
  (i'm using mysql database)</p>
  
  <p>can someone show me any efficient way to do this)</p>