display text values in one combobox with respect to other combobox

comtest

New Member
I am a .net beginner. I am reading a XML file and showing it in two comboboxes ie., \[code\]cbProduct\[/code\] and \[code\]cbBrandName\[/code\]I need to show text in \[code\]cbBrandName\[/code\] with respect to the selected text in \[code\]cbProduct\[/code\].I implemented the below code:\[code\]DataSet ds = new DataSet();ds.ReadXml(@"..\..\stock.xml");cbProduct.DataSource = ds.Tables[0].DefaultView.ToTable(true, "productname");cbProduct.DisplayMember = "productname";cbBrandName.DataSource = ds.Tables[0].DefaultView.ToTable(true, "brandname");cbBrandName.DisplayMember = "brandname";\[/code\]The above code is showing all the text values in \[code\]cbBrandName\[/code\]. How to make it to show only the text values which are linked to the selected "productname" column of xml file in \[code\]cbProduct\[/code\].Please Help.
Thanks in Advance.
 
Back
Top