How to determine whether the user has already selected an option from a multi select list

  • Thread starter Patrick Olurotimi Ige
  • Start date
P

Patrick Olurotimi Ige

I would like to capture when a user has already selected an option from
a multi select list / or Textbox
So for example if a user selects a value 3 using a dropdown list or by
inputing a value it shouldn't be allowed to select 3 again only values 2
and 1.
using a rated 1 to 3 in order of preference)
 
M

MasterGaurav

No. You cannot disable selection of any specific items in Multi-Select
ListBox.

However, you can do a lengthy trick:

1. Add an onchange (client-side) event to the DDL
2. Whenever the value is changed, repopulate the Multi-Select ListBox
with all items except the one selected in DDL.

^^ This can also be done on server side -- use autopost back.

It's a little tricky and lengthy. I would suggest you handle it on the
serverside by manipulating the selected value.


--
Cheers,
Gaurav Vaish
http://www.mastergaurav.org
http://mastergaurav.blogspot.com
--------------------------------
 
P

Patrick Olurotimi Ige

Hi Gaurav,
But is it possible if it isn't MultiSelect?
It could be a dropdown list or even a textbox.
 
G

Guest

Why not use OnChange, if the user chooses the already selected alternative
there is no change...
/N
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top