We help IT Professionals succeed at work.
Get Started

How to force indexchanged event when my dropdown list contains only one item

415 Views
Last Modified: 2013-11-26
Hi Experts,

I have a drop-down list of banks that gets dynamically filled from an SQL table based on order number. It is therefore possible for the DDL to contain a single entry for a given order. Normally, when I select an entry in the drop down list, the indexchanged event causes an SQL query to run which populates a series of textboxes with related data about the selected entry.

My problem is this: When I have only one entry in the DDL, no matter how many times I click or double-click on it to select it, an indexchanged event is never triggered. How can I force an indexchanged event for this scenario, so that the bank's related data will be displayed?

Thanks,

taduh
Comment
Watch Question
Financial Systems Analyst
Commented:
This problem has been solved!
Unlock 2 Answers and 3 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE