S
SiewSa
Attached herewith part of my code for your references. My code is working
fine in normal dotnet frameworks but it's giving me errors while I am
applying the same way in Compact Framework.
ListView1.Items.Clear()
With myDataSet1.Tables("Table")
For intCounter = 0 To .Rows.Count - 1 Step 1
ListView1.Items.Add(.Rows(intCounter).Item(0).ToString) 'ERROR
ListView1.Items(intCounter).SubItems.Add(.Rows(intCounter).Item(1).ToString)
ListView1.Items(intCounter).SubItems.Add(.Rows(intCounter).Item(2).ToString)
ListView1.Items(intCounter).SubItems.Add(.Rows(intCounter).Item(3).ToString)
ListView1.Items(intCounter).SubItems.Add(.Rows(intCounter).Item(4).ToString)
ListView1.Items(intCounter).SubItems.Add(.Rows(intCounter).Item(5).ToString)
Next
End With
With the above coding, I was prompted with the error that saying String
datatype cannot be converted to ListViewItem. I have gone through a lot of
testings but still cannot get it done. Can anyone out there share with me
the code to binding data for listview control in Compact framework? Real
appreciate that! Thanks.
fine in normal dotnet frameworks but it's giving me errors while I am
applying the same way in Compact Framework.
ListView1.Items.Clear()
With myDataSet1.Tables("Table")
For intCounter = 0 To .Rows.Count - 1 Step 1
ListView1.Items.Add(.Rows(intCounter).Item(0).ToString) 'ERROR
ListView1.Items(intCounter).SubItems.Add(.Rows(intCounter).Item(1).ToString)
ListView1.Items(intCounter).SubItems.Add(.Rows(intCounter).Item(2).ToString)
ListView1.Items(intCounter).SubItems.Add(.Rows(intCounter).Item(3).ToString)
ListView1.Items(intCounter).SubItems.Add(.Rows(intCounter).Item(4).ToString)
ListView1.Items(intCounter).SubItems.Add(.Rows(intCounter).Item(5).ToString)
Next
End With
With the above coding, I was prompted with the error that saying String
datatype cannot be converted to ListViewItem. I have gone through a lot of
testings but still cannot get it done. Can anyone out there share with me
the code to binding data for listview control in Compact framework? Real
appreciate that! Thanks.