Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / JScript / March 2005

Tip: Looking for answers? Try searching our database.

vb.listbox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nicole Jacobs - 17 Mar 2005 15:02 GMT
(Type your message here)
 Dim x As Integer
       ' Loop through all items the ListBox.
       For x = 0 To ListBox1.Items.Count - 1
           ' Determine if the item is selected.
          i have this code in a button
how do i say that if i click on an item in the listbox display whether it is available or not in a msgbox...the Status of the item is in my hire table which also contain an itemid column

If ListBox1.GetSelected(x) = True Then

               Dim r As DataRow
               
               For Each r In ds.Tables("Hire").Rows
                   If r("ItemID") = ListBox1.SelectedValue Then
                       MsgBox("blah")
                   End If
               Next
             
           End If
       Next
name - 20 Mar 2005 08:27 GMT
I believe that along form.id.selectedIndex will get it.

Dependant of "multiple" type.

Which is shorter than your 2 lines toward the end.

> (Type your message here)
>   Dim x As Integer
[quoted text clipped - 3 lines]
>            i have this code in a button
> how do i say that if i click on an item in the listbox display whether it is available or not in a msgbox...the Status of the item is in my hire table
which also contain an itemid column

>  If ListBox1.GetSelected(x) = True Then
>
[quoted text clipped - 15 lines]
>
> <Id>QQMliPItQkazSeHF0YpmxA==</Id>

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.