|
Well, I'm trying everything I can think of, but I just can't get this working. I have two tables... Category(parent), Items(child). All I want to do is show the Categories in listbox1, and the items with the corresponding CategoryID (the selected CategoryID) in listbox2. I've come pretty close (thanks to jmcilhinney, and MSDN) but I just can't seem to get it. Here is what I have. It shows the parent child relationships in listbox1 only. I just need to move the items to listbox2, and have them respond to the selected category in listbox1.
OleDbDataAdapter1.Fill(Dsboth1) OleDbDataAdapter2.Fill(Dsboth1)
For Each dr1 In Dsboth1.Tables("Category").Rows ListBox1.Items.Add(("Category: " + dr1("CategoryName").ToString())) For Each dr2 In dr1.GetChildRows(Dsboth1.Relations("MYDR")) ListBox1.Items.Add(("Items: " + dr2("ItemName").ToString())) Next Next |