Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi, I'm relatively new to programming.

 

After I load up my items in the listbox. I want to choose items and have them display in a datagrid.

 

For instance, If I have apples, oranges, bananas in the listbox. Say I select apples then oranges, I want them to display as a list in the datagrid. Later, I will assign values to them and add them up.

 

Like this:

apples

oranges

 

Also, how can I load up the items from another form. Say I have a textbox in anther form that can add onto the current list.

 

For instance. I have a textbox named txtAddItem in frmAddItem and when I type into it and hit update, it will be added to the other form's, named frmOther, listbox.

 

Thanks in advance

  • Moderators
Posted

you can use this to get the value of each item selected...

            Dim nCounter As Integer

           For nCounter = List1.Items.Count To 1 Step -1
               If List1.GetSelected(nCounter - 1) = True Then
                   MessageBox.Show(List1.Items.Item(nCounter - 1))
               End If
           Next

 

And please DO NOT report a post unless you have a valid reason.

It is not to get our attention to merely answer your threads.

Visit...Bassic Software

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...