473,667 Members | 2,557 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

getting selected values from multiselect listbox

How do I get the values selected from a multiselect listbox?
Cheers,

Mike

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #1
1 7123

"Mike P" wrote...
How do I get the values selected from a multiselect listbox?


this.listBox1.S electedItems;

and

this.listBox1.S electedIndices;

returns collections, through which you can iterate, etc.
// Bjorn A
Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5015
by: Alvey Sidecast | last post by:
This is probably embarrassingly simple, but I've been trawling through this ng for hours now and my brain hurts. I've got an unbound multi-column listbox (multi-select=none) whose rowsource is a query based on a combobox selection. After the selection is made from the combobox the listbox may, or may not, have records in it. If it doesn't, no problems, I've got; If Me.lbxContacts.ItemsSelected.Count = 0 Then
2
7953
by: Peder Y | last post by:
Anyone knows if there is some kind of property or function that will return the last selected/deselected item/index in a multiselect ListBox? SelectedIndex will point to first index in the SelectedIndices collection, so this is a dead end. My solution so far is to override the mouse click and key pressed events. However, since arrow up/down seems to keep a record of the item that currently has focus somehow, I would believe this...
0
1431
by: antonyliu2002 | last post by:
I am not new to programming, but I am new to VB .NET. I have a multiselect listbox like this: Please select your favorite fruit: Apple Banana Coconut Date
1
1130
by: Bruce F | last post by:
I have a multiselect ListBox and I want to determine which items are selected. I don't want to use "SelectedItems" but want to loop through all items and check if selected or not. What I want is: For i = 0 To ListBox1.Items.Count ' code to check if item(i) is selected Next
4
1710
by: Karen Hill | last post by:
I've got a list box that has two columns. I would like to get the value of the first column of the user selected row. How would I do that? It is not a multiselect listbox. PS Whats the difference between a "field list" and a "value list" in a combobox? Thanks in advance
6
8712
by: EiEiO | last post by:
Hi All... I have an unbound form. The form includes: A ComboBox (from table Callers) "cmbTMCode " A ListBox MultiSelect=Extended, (from table Leads) "lstSelect" A CommandButton "btnAssign" I would like to 1) Select a value from "cmbTMCode"
2
1926
by: Jerry | last post by:
Hi!, I am just starting out in c# here and what I want to do is get a list of files, list them in a a listBox. I want the to beable to select either 1, 2, ... ALL files in this list and execute a job on them. Here is what I have so far: using System;
3
6291
by: peter.mosley | last post by:
I've tried googling for the answer to this problem, without any luck. I'm sure the truth must be out there somewhere! I have a multiselect listbox populated with many items (set by the RowSource property). In my code I cause a number of these to be selected - but if the first selected item is not within the currently visible range then there is no change to the display. This gives the impression that nothing has happened. I think...
0
1255
by: waldedg | last post by:
I have a ListBox set as Multiselect. I am populating the table thruough asp.net code. But I am using another dataset to get the items that should be selected. The only item that ends up selected is the last item in the dataset. The code I am using for setting the selected items is: DataSet ds1 = SqlHelper.ExecuteDataset(ConnStr, "StoredProd", Parm); lbRequestTime.SelectionMode = ListSelectionMode.Multiple; ...
0
8457
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8883
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8788
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8563
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7390
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6203
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2776
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2013
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.