473,766 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting listbox item doubleclicked when SelectionMode=m ulti

Visual Studio .NET 2002

I've got an application in which I need to be able to
click on a listbox item to initiate a dialog pertaining to
that item.

I'd like to be able to keep the dialog multi-select, but
the way the listbox seems to be set up in C#, the
SelectedItem member is just the first item in the
collection of all selected items, and it may not be the
item you actually clicked if many items are selected. I
need to isolate the item that is actually clicked, whether
other items are selected or not.

I can't seem to find a way to get the index or text of the
item i actually clicked. I'm sure it is passed in the
EventArgs, but I checked this in debug and couldn't find
anything being passed in.

Any help would be very very appreciated!
E

Nov 15 '05 #1
0 1364

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

Similar topics

3
3615
by: Paul T. Rong | last post by:
I have a listbox (of product names) control on my form. I want to pass the selected item (a product name) to a subform, and the product unitprice should apear automatically next to the product name in the subform. Is it possible? How do I do this? Thanks in advance. Paul from Slovakia
0
1140
by: Bruce | last post by:
Is there any way to determine a registry key's type (DWORD, string, multi-string, etc.) when using the RegistryKey class to read keys? Bruce
2
2157
by: bill yeager | last post by:
I need to get the SelectedValue of each item selected in a multi-selection listbox. I have the following code, but it just returns me the SelectedValue of ONLY the first item selected in the list: Dim liGroup As ListItem For Each liGroup In lstGroups.Items
1
2885
by: JMann101 | last post by:
I am writing a ASP.NET(VB) application and am having some trouble. I have a datagrid which list users and when an admin clicks "edit" a defined column becomes visible and a dynamic listbox control is added to that column/row. When the admin clicks "update" I am unable to retrieve the values that were selected from that listbox. Basically, This is a multi-select listbox, so I need to loop to pull all selected items. This is the only...
4
998
by: zdrakec | last post by:
Hello all: I have two listboxes on a webform, the user selects items from the first (which is, naturally, multi-select), and clicks a button that will copy the selected items into the second box. The code to achieve this is simple: I iterate through the first listbox' items collection, and if listbox.item(x).selected is true - if listbox1.item(x).selected then listbox2.items.add(listbox1.item(x).text)
0
858
by: Allen Maki | last post by:
Hi everybody, I appreciate if someone give me a help. When I used the 2 following lines in a simple code, the code will compile with no error:
2
1347
by: jimb20 | last post by:
ive looked for this and the basic code for inputs but it doesnt have anything about this example: say my file looks like this ------------- yes no 1 14 -------------
6
16413
by: probashi | last post by:
Hi, Issue: After post back selected item of a list box is getting out of focus (when it contains more items than it's size). I have a List Box in an ASPX page. I select an item from the ListBox and after post back the item is still selected but it is not focused (i.e. I have to scroll down to see the selected item) Any way to fix this!
1
2828
by: gayano | last post by:
HI all, I have 2 forms 1. MainForm 2. SubForm Then I have a listbox in the subform and textbox in the mainform. (when i click on the listbox item) (i dont want multi selections) I want to get the selected item from the listbox and put it in to the textbox
0
9568
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
10008
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
9959
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
9837
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8833
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...
0
6651
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.