title: Combobox databinding showing system.data.datarowview
body: <p>I am binding combobox with datasource, displaymember, valuemember. It is working fine in my computer but it is not working in clients pc. Following is my source code:</p>
  
  <p>cbxAlloyBinding method is called from the Constructor of the UserControl.</p>
  
  <pre><code>private void cbxAlloyBinding()
      {
          DataTable dt = new DataTable();
          SqlDataAdapter adp = new SqlDataAdapter("SELECT alloyName,alloyId FROM alloy", con);
          adp.Fill(dt);
  
          if (dt.Rows.Count &gt; 0)
          {
              cbxMetal.DisplayMember = "alloyName";
              cbxMetal.ValueMember = "alloyId";
              cbxMetal.DataSource = dt;
          }
          else
          {
              cbxMetal.Text = "";
          }
      }
  
      private void cbxMetal_SelectedIndexChanged(object sender, EventArgs e)
      {
          if (cbxMetal.SelectedIndex != -1)
          {
              DataTable dt = new DataTable();
              tempcmd = new SqlCommand("SELECT specification,alloyCode FROM alloy where alloyId='" + cbxMetal.SelectedValue + "'", con);
              SqlDataAdapter adp = new SqlDataAdapter(tempcmd);
              adp.Fill(dt);
              if (dt.Rows.Count &gt; 0)
              {
                  txtSpecification.Text = dt.Rows[0]["alloyCode"].ToString();
                  txtSupplyConditions.Text = dt.Rows[0]["specification"].ToString();
                  cbxheatBinding();
              }
              else
              {
                  txtSpecification.Text = "";
              }
  
          }
      }
  </code></pre>
  
  <p>This is bothering me from last two days and i almost tried all tricks but it is still not working.</p>
  
  <p>Client's PC is using Windows 7 ultimate, sql server 2005 and .net framework 3.5.</p>