1
Reply

Windows Forms VB.NET : bind List box control values

venkii R

venkii R

Apr 15 2011 6:24 AM
2.8k
Hi All,

I am working on windows Forms with Vb.net 2005. i have two Group boxes(like Panels in Asp.net) . one have controls like Text boxes and List box. other have gridView. when user select an item from Gridview, all the controls needs to fill with appropriate values. in some cases list box with multi select.

remaining all controls binded well in Edit mode.. but List box binding failed for me.

my code like this

For Each item As ListViewItem In lstState.Items.Item


For i As Integer = 0 To strArrayList.Length - 1


If strArrayList(i).Equals(item) Then
item.Selected = True
Else
item.Selected = False
End If
Next i
Next

it's giving error for me. plz send me the working code which wil resolve my issue.

Regards,
Venky

Answers (1)