Hi. I am new to C#, and I am having trouble getting the multiple
selection of listbox to work. I have an asp.net web form, and I need
two listboxes which are filled with an access table. I have to be
able to select multiple items, and fill a datagrid with the results.
I can fill 2 listboxes and a datagrid, but not with multiple
selections. So far, I have no code behind, I have completed it with
just using the characteristics of the controls and manipulating the
query statements.
Does someone have a generic code-behind for this that I can relate to
my situation? I realize I have to iterate through the selections, but
I don't understand how. If you would like to see my page, just ask
and I will post it.
Any help would be greatly appreciated.
Thank you. 1 2767
Marisa,
Is the SelectionMode property of the ListBox set to
ListSelectionMo de.Multiple?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"Marisa" <th************ *@gmail.comwrot e in message
news:bf******** *************** ***********@e10 g2000prf.google groups.com...
Hi. I am new to C#, and I am having trouble getting the multiple
selection of listbox to work. I have an asp.net web form, and I need
two listboxes which are filled with an access table. I have to be
able to select multiple items, and fill a datagrid with the results.
I can fill 2 listboxes and a datagrid, but not with multiple
selections. So far, I have no code behind, I have completed it with
just using the characteristics of the controls and manipulating the
query statements.
Does someone have a generic code-behind for this that I can relate to
my situation? I realize I have to iterate through the selections, but
I don't understand how. If you would like to see my page, just ask
and I will post it.
Any help would be greatly appreciated.
Thank you.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jen F. |
last post by:
I have inherited a medical database in which there are multiple values
stored in a single field (ie. "Current Conditions" field might contain
1-20 different conditions, separated by comma (ie. "Heart
Disease,Hyper Tyroid,Cancer" etc.
I would like to search via combo box for any one or more than one
value in this field, ie-what patients have Heart Disease or Cancer by
selecting these disorders off the combo box list.
Any help would be...
|
by: carl.barrett |
last post by:
Hi,
I have a list box that displays 2 columns. Behind it sits a query with
five columns. These are Column1 (DOB), column2 (a concatenated string
of Surname Forname, Title), Column3 (Surname), column4 (Forename) and
column5 (title). Columns 3,4 and 5 are not shown in the list box only
the first two.
DOB Name: &" "&&", "&
|
by: Ahmet Karaca |
last post by:
Hi.
myds.Reset();
mycommand.SelectCommand.CommandText=
"Select att1 from Ing as Ingredient, Pro as Product "+
"where Pro.ad='apple' and Pro.id=Ing.id";
mycommand.Fill(myds, "Product"); // Here is the problem
listbox.DataSource = myds.Tables.DefaultView; // Here again
listbox.DataTextField = "invid"; // Here again
listbox.DataBind();
mycon.Close()
|
by: ted |
last post by:
Hi,
I can't figure out how to set multiple items in a ListBox to selected when
the listbox is in a User Control.
When the ListBox is set in directly into a form I can use the following:
listbox.SelectionMode = SelectionMode.MultiExtended;
listbox.SelectedIndex = 1;
listbox.SelectedIndex = 2;
|
by: DC Gringo |
last post by:
I have two listboxes, the first of which is an autopostback=true that allows
multiple row selection. When I select multiple values (by holding down CTL)
in the first one, it should query the second one. I seem unable to do this
as it only sends back the first item I select whether I have the CTL key
down or not. Upon the return trip, I can select another one, but it still
only sends value for the last one I selected.
-- MY LISTBOX --...
| |
by: Lie |
last post by:
Hi all,
I have problem in getting selectedindex of multiple listbox selection in a
datagrid. I have a listbox with multiple selection mode inside datagrid. In
Edit mode, I need to get back all selected items of that listbox and display
it.
can anyone help?
Thanks
|
by: sab |
last post by:
Hi,
We have a web form with a listbox. The listbox is a multiple select listbox
and has data that looks something like:
ALL
Unit 1
Unit 2
Unit 3
Note: "ALL" is always the first item in the list.
|
by: Henry Padilla |
last post by:
I'm trying to select multiple items in a listbox and the demo from the help
file is not working. What do I do to select multiple items in a listbox?
Code sample below.
Tom P.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For Each SelectedValue In ColumnInfo.Tables(2).Rows
Index = ValuesListBox.FindStringExact(SelectedValue("VALUE_S"))
If Index >= 0 Then
|
by: karups |
last post by:
Hi,
I've got listbox in my .aspx page where the users can make multiple
selection.
So, Users can select 7 items in listbox, I have to take value from
items and
pass it to stored procedure to extract a dataset back.
1.What should i do while passing the multiple selected values
2.Can i use 'in' clause in SQL procedure like
eg:Select a.xxx from a where a.yyy in @y
|
by: billa856 |
last post by:
Hi,
My Project is in MS Access.
In that I have one form in which I have some textboxes,comboboxes and listboxes.
Now when I select value from 1st combobox(CustomerID) then it wil generate list for 1st listbox(PalletNo).
Now I want to select miltiple values from that 1st listbox(PalletNo).
and based upon this selection from 1st listbox(PalletNo) and combobox(CustomerID) I want to generate list for 2nd listbox(PONo).
For example
...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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...
|
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...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |