A
aaapaul
VS 2005
I have a databound checkedlistbox:
With Me.LCheckedlistbox1
.BeginUpdate()
.Sorted = True
.DataSource = objB.Benutzertabelle
.DisplayMember = "Nachname"
.ValueMember = "Persno"
.EndUpdate()
End With
The selected indices I can get with:
For Each objView As DataRowView In
Me.LCheckedlistbox1.CheckedItems
MessageBox.Show(objView(Me.LCheckedlistbox1.ValueMember))
Next
But how can I set checked items by indeces:
E.g. I am having the value members 'A','B','X'
Something like this
For intH As Integer = 0 To Me.LCheckedlistbox1.Items.Count - 1
if ... then setitemchecked....
Next
Thanks
aaapaul
I have a databound checkedlistbox:
With Me.LCheckedlistbox1
.BeginUpdate()
.Sorted = True
.DataSource = objB.Benutzertabelle
.DisplayMember = "Nachname"
.ValueMember = "Persno"
.EndUpdate()
End With
The selected indices I can get with:
For Each objView As DataRowView In
Me.LCheckedlistbox1.CheckedItems
MessageBox.Show(objView(Me.LCheckedlistbox1.ValueMember))
Next
But how can I set checked items by indeces:
E.g. I am having the value members 'A','B','X'
Something like this
For intH As Integer = 0 To Me.LCheckedlistbox1.Items.Count - 1
if ... then setitemchecked....
Next
Thanks
aaapaul