shubhangi khandale

shubhangi khandale

  • NA
  • 73
  • 147.4k

When binding combo no any value display

Dec 12 2011 6:55 AM
 Hi 
When i binding combobox no any values display, my code is :
SqlCommand cmd1 = new SqlCommand();
cmd1.Connection = con;
cmd1.CommandType = CommandType.Text;
cmd1.CommandText = "select name_of_party from client_master";
SqlDataAdapter da = new SqlDataAdapter(cmd);

DataSet ds = new DataSet();
con.Open();
da.Fill(ds);
combo_nameofparty.DataSource = ds.Tables["client_master"];
combo_nameofparty.DisplayMember = "name_of_party";
combo_nameofparty.ValueMember = "name_of_party";


con.Close();




Answers (2)