Vasanth Jack

Vasanth Jack

  • NA
  • 289
  • 33.1k

How to bind a combobox with XML

Feb 24 2017 8:43 AM
I have an XML file in Win forms.I want to Bind a xml in ComboBox ..I tried some code.But itz not working
 
 
DataSet ds = new DataSet();
ds.ReadXml(System.IO.Path.GetFullPath("Employee.xml"));
cbemp.DisplayMember = "EmployeeName";
cbemp.ValueMember = "EmployeeID";
cbemp.DataSource = ds.Tables[0];
 

Answers (4)