ya i solve that error but still now i get new problem please give me idea
i bind xml file in combobox but i selected item that ll be cheked and show wt i want so selected item not working proper
below is my code please resolve it.
i bind like this
DataSet ds = new DataSet();
//XmlDocument xmldc = new XmlDocument();
ds.ReadXml(path + @"\Refrigirater.xml");
comboBox1.DataSource = ds.Tables[0];
comboBox1.DisplayMember = "name";
comboBox1.ValueMember = "id";
in xml file i have
Mubai,Kolkata.
and slected item changed that is
TypeScript
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { if(comboBox1.SelectedItem.ToString()==Mumbai) { textBox1.Text =(You Selected : + comboBox1.SelectedItem.ToString()); } else if(comboBox1.SelectedItem.ToString(==Kolkata) { textBox1.Text = (You Selected : + comboBox1.SelectedItem.ToString()); }i want when i selected mumbai goto mumbai ifcondition....but dont go it.
please resolve my error.
----------
Thanks
Venkat.S


VulpesRank #55 · 29.2K reputationPosted Jun 10, 2011, 12:30 AM EDT
Praneeth KumarRank #4,422 · 344 reputationPosted Jun 9, 2011, 11:32 PM EDT
Venkat S187 reputationPosted Jun 9, 2011, 11:42 PM EDT
i try but
Venkat S187 reputationPosted Jun 10, 2011, 12:46 AM EDT
thanks for replay me .
i understand like xml file is binded it display all those things
ant then i selected any item i want to chang some but its not get an item wt i want to do please give me any otherways to get selected item
VulpesRank #55 · 29.2K reputationPosted Jun 10, 2011, 2:59 AM EDT
If you do want to modify them, then I'd:
1. Set the DataSource property to null.
2. Modify the DataTable directly.
3. Set the DataSource back to the DataTable.