Problem with CheckedListBox

grzyweasel

Newcomer
Joined
Nov 4, 2004
Messages
1
I have a checked list box that shows all the orders and then you check the ones you want to import. Right now I just have a message box that shows me which ones have been checked. But rather than displaying the Value is shows "System.Data.DataRowView". The problem I think lies in the use of the .ToString construct for the checkeditems. Problems is, that's Microsoft's code. Any other solution?

If clbOrderstoImport.CheckedItems.Count <> 0 Then
' If so, loop through all checked items and print results.
Dim x As Integer
Dim s As String = ""
For x = 0 To clbOrderstoImport.CheckedItems.Count - 1
s = s & "Checked Item " & Str(x + 1) & " = " & clbOrderstoImport.CheckedItems(x).ToString & ControlChars.CrLf
Next x
MessageBox.Show(s)
 
Back
Top