Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have an array of values that match some of the values (as in valueMember not displayMember) within a multi-select listbox bound to a datatable from a dataset.

 

I want to select all the items in my listbox where the items value is in my array.

 

I can't seem to figure out the right syntax.

 

I currently have

For Each anItem In lstMachineStatus.Items
   If anItem.Item("query_id") = arrMachineStatus(n) Then
       'how do i get the listboxes index of anItem to place in below?
       lstMachineStatus.SetSelected(SOMETHINGHERE, True)
   End If
Next

 

any help much appreciated

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...