fill Combobox with xml data
Visual Basic
1
Posts
1
Posters
0
Views
1
Watching
-
I tried to fill a combobox with xml data, but it wont work the sourcecode is like this: Dim ds As New DataSet("Koder") ds.ReadXml("D:\Utveckling\dotnet\tester\forms tester\Forms test\bin\Codes.XML") Dim i As Integer For i = 0 To ds.Tables(0).Rows.Count - 1 With ComboBox1 .Items.Add(ds.Tables(0).Rows(i)("code").ToString) End With Next i I recieved a error message with: Invalid Cast exception my xml sheet look like this:
1001 Hej
1002 Då
9001 Bilresa How should I solve this problem :confused: