I am using cascading dropdowns, where one dropdown determines the data in
the next, etc...
If a dropdown has only one item in it, the SelectedIndexChanged event is
never fired, even if you click on the dropdown and "reselect" the single
item. This also happens when there are multiple items in the DD with the
first item. You have to select another list item, then reselect the first
one to have the event fire. I have it set to AutoPostBack, but obviously it
is not in these situations. Is there a way to make the event happen in
these situations.
I tried the following (thinking it would force the user to select the item
and fire the event), but it still selected the single item.
ddTest.DataBind()
ddTest.SelectedIndex = -1
Thanks
--
********************************
Jon Rosenberg 3 1530
Try adding a "-- Select Item --" item to the top of the list. That way,
selecting even the only ONE (other) item in the dropdown causes a
selectedIndex changed event.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
"Jon" <ru******@msn.com> wrote in message
news:10*************@corp.supernews.com... I am using cascading dropdowns, where one dropdown determines the data in the next, etc...
If a dropdown has only one item in it, the SelectedIndexChanged event is never fired, even if you click on the dropdown and "reselect" the single item. This also happens when there are multiple items in the DD with the first item. You have to select another list item, then reselect the first one to have the event fire. I have it set to AutoPostBack, but obviously
it is not in these situations. Is there a way to make the event happen in these situations.
I tried the following (thinking it would force the user to select the item and fire the event), but it still selected the single item.
ddTest.DataBind() ddTest.SelectedIndex = -1
Thanks
-- ******************************** Jon Rosenberg
Thanks. Not the solution I was hoping for, but it certainly works.
"Kevin Spencer" <ks******@takempis.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl... Try adding a "-- Select Item --" item to the top of the list. That way, selecting even the only ONE (other) item in the dropdown causes a selectedIndex changed event.
-- HTH, Kevin Spencer .Net Developer Microsoft MVP Neither a follower nor a lender be.
"Jon" <ru******@msn.com> wrote in message news:10*************@corp.supernews.com... I am using cascading dropdowns, where one dropdown determines the data in the next, etc...
If a dropdown has only one item in it, the SelectedIndexChanged event is never fired, even if you click on the dropdown and "reselect" the single item. This also happens when there are multiple items in the DD with the first item. You have to select another list item, then reselect the first one to have the event fire. I have it set to AutoPostBack, but obviously it is not in these situations. Is there a way to make the event happen in these situations.
I tried the following (thinking it would force the user to select the item and fire the event), but it still selected the single item.
ddTest.DataBind() ddTest.SelectedIndex = -1
Thanks
-- ******************************** Jon Rosenberg
Just thinking about this. Forgive me if this is a silly idea, but here goes.
I get the impression that you don't want the "-- Select Item --" to show in
the dropdown list. I would suggest including it as suggested, but setting
the style atrribute to "visibility: hidden; height:0; width:0"
ME
"Jon" <ru******@msn.com> wrote in message
news:10*************@corp.supernews.com... Thanks. Not the solution I was hoping for, but it certainly works.
"Kevin Spencer" <ks******@takempis.com> wrote:- Try adding a "-- Select Item --" item to the top of the list. That way, selecting even the only ONE (other) item in the dropdown causes a selectedIndex changed event.
"Jon" <ru******@msn.com> wrote:- I am using cascading dropdowns, where one dropdown determines the data
in the next, etc...
If a dropdown has only one item in it, the SelectedIndexChanged event
is never fired, even if you click on the dropdown and "reselect" the
single item. This also happens when there are multiple items in the DD with
the first item. You have to select another list item, then reselect the first one to have the event fire. I have it set to AutoPostBack, but
obviously it is not in these situations. Is there a way to make the event happen in these situations.
I tried the following (thinking it would force the user to select the item and fire the event), but it still selected the single item.
ddTest.DataBind() ddTest.SelectedIndex = -1
--
Martin Eyles ma**********@NOSPAM.bytronic.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Vinay |
last post by:
Hi All:
I'm having a strange problem with the dropdownlist. Here is what is
happening:
I have a webform on which I have a whole bunch of controls. The form has 2
dropdownlists. The dropdowns...
|
by: Frances |
last post by:
Hi All,
* PREMISE *
I'm creating an Access form with 150 items subdivided into 20
categories. Multiple categories (and items) can be selected so my
user wants checkboxes. All of the options...
|
by: Damon |
last post by:
I am working on a site in which I would like to have two dropdowns that will
allow a user to navigate through the administrative pages of the site. The
first would allow the user to choose the...
|
by: Andy |
last post by:
What I want to do is to populate multiple dropdowns when editing.
Presumably...
a) I should use a DataReader so that I can get each ResultSet for each
dropdown control, and that should cut down...
|
by: Simon Harvey |
last post by:
Hi everyone,
I keep getting a problem with dropdownlist controls. It sounds really stupid,
but my app is screwed as long as this keeps happening.
It seems to spontaneously happen and then I...
|
by: cretaceous |
last post by:
Hi
I'm a php/mysql developer and struggle when it comes to javascript !
I've looked all over for a solution but am rubbish at adapting javascript
I've got two select dropdowns in a form
The...
|
by: bogorman |
last post by:
Am trying to add a "video" to a webpage which is based on a template containing a javascript menu. The site has hundreds of pages all based on this template and the menu works fine
The page can be...
|
by: sbart |
last post by:
I am programing in asp.net vb using AjaxToolkit cascadingDropDown.
I do not have access to AjaxToolkit cascading dropdown event handlers.
I have a series of dropdowns. The selection from one of...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
| |