title: A field or property with the name 'ApproveID' was not found on the selected data source
body: <p>i try to add approve type values in dropdownlist in grdiview </p>
  
  <p><strong>GridView</strong></p>
  
  <pre><code>&lt;asp:BoundField HeaderText="ApproveID" DataField="ApproveID"&gt;&lt;/asp:BoundField&gt;
              &lt;asp:TemplateField&gt;
                  &lt;ItemTemplate&gt;
  
  
                      &lt;asp:DropDownList ID="DropDownList4" runat="server" 
                    class="vpb_dropdown"&gt;
                      &lt;/asp:DropDownList&gt;
                  &lt;/ItemTemplate&gt;
              &lt;/asp:TemplateField&gt;
  </code></pre>
  
  <p><strong>SQL</strong></p>
  
  <pre><code>ALTER procedure [dbo].[viewdocid]
  as
  select dbo.DocumentInfo.DocID,dbo.DocumentInfo.DocName,dbo.DocumentInfo.Uploadfile,dbo.DocType.DocType,dbo.Department.DepType
  from dbo.DocumentInfo left join dbo.DocType on dbo.DocumentInfo.DocTypeID=dbo.DocType.DocTypeID left join  
  dbo.Department on dbo.DocumentInfo.DepID=dbo.Department.DepID
  </code></pre>
  
  <p><strong>C#</strong></p>
  
  <pre><code> protected void OnRowDataBound(object sender, GridViewRowEventArgs e)
      {
          if (e.Row.RowType == DataControlRowType.DataRow)
          {
              //Find the DropDownList in the Row
              DropDownList ddlvalue = (e.Row.FindControl("DropDownList4") as 
               DropDownList);
             ddlvalue .DataSource = GetData("SELECT ApproveID,ApproveType FROM 
              ApproveType");
              ddlvalue .DataTextField = "ApproveType";
             ddlvalue .DataValueField = "ApproveID";
             ddlvalue .DataBind();
  
              //Add Default Item in the DropDownList
              ddlvalue.Items.Insert(0, new ListItem("Please select"));
  
              //Select the Country of Customer in DropDownList
              //string country = (e.Row.FindControl("lblCountry") as Label).Text;
              //ddlvalue.Items.FindByValue(country).Selected = true;
          }
      }
  </code></pre>
  
  <p>i add this code in page load </p>
  
  <pre><code>            GrdFileApprove.DataSource = dd.gdocid();
              GrdFileApprove.DataBind();
  </code></pre>
  
  <p>where as there is no approveid column in documents table this is only in approval table .
  and i try to show approve.reject and pending in dropdownlist in gridview</p>
  
  <p>when i debug the code it show me error in page load code..</p>
  
  <pre><code>A field or property with the name 'ApproveID' was not found on the selected data source.
  </code></pre>