title: can not bind to datatable with no name error while filtering a gridview
body: <p>I have a <code>datagridview</code> and 5 <code>ComboBoxes</code> and I am trying to filter the grid's rows with ComboBox's text values. The grid is filled with stored procedure depends on some conditions in <code>FormLoad</code> event. Should I fill it again in the <code>btn_filter</code> click event?</p>
  
  <p>Anyway this exception is catched at code below: <code>cannot bind to datatable with no name.</code></p>
  
  <p>here is the code for <code>btn_filter</code>:</p>
  
  <pre><code>    private void btnFilter_Click(object sender, EventArgs e)
      {
          String filterStr = "";
  
          if (cmbGrp.Text.Trim() != String.Empty)
              filterStr +=  "group ='" + cmbGrp.Text.Trim() + "' and";
          if(cmbMdl.Text.Trim() != String.Empty)
              filterStr += " model ='" + cmbMdl.Text.Trim() + "' and";
          if (cmbTrh.Text.Trim() != String.Empty)
              filterStr += " tarh ='" + cmbTrh.Text.Trim() + "' and";
          if (cmbSiz.Text.Trim() != String.Empty)
              filterStr += " size ='" + cmbSiz.Text.Trim() + "' and";
          if (cmbClr.Text.Trim() != String.Empty)
              filterStr += " color ='" + cmbClr.Text.Trim() + "'";            
  
          if (filterStr.LastIndexOf("and") == filterStr.Length - 3)
              filterStr = filterStr.Remove(filterStr.Length-3,3);
  
  
          DataView view = new DataView();
          if (condition1)
              view.Table = Production.usp1(txtProdCode.Text);
          else if (condition2)
              view.Table = Production.usp2();
          else
              return;
          view.RowFilter = filterStr;
          dgv.DataSource = view;    
      }
  </code></pre>
  
  <p>and here is the storedProcedure related functions (in <code>Production</code> class):</p>
  
  <pre><code>    public static DataTable usp2()
      {
          SqlCommand cmd = new SqlCommand("usp2");
          return callProc(cmd);
      }
  
      public static DataTable usp1(String prod_code)
      {
          SqlCommand cmd = new SqlCommand("usp1");
          cmd.Parameters.Add(new SqlParameter("@prod_code", prod_code));
          return callProc(cmd);
      }
  </code></pre>