473,799 Members | 3,817 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to tell when I leave a Combobox vs SelectedIndex changed?????

I have a combobox where I populate the remaining items on the screen
according to what is picked in the combobox(depend ent prompting). Is
there anyway to tell when a user looses focus on the combo versus
selected index changed?

So, say the user clicks on the combobox and types a letter to go to
the values starting with "S" the page loads, then they open the combo
and pick the value they want and the page loads a gain. I only want to
load after the user has picked the value they want???

Thanks
Nov 21 '05 #1
3 2180
I have found the SelectionChange Committed event handy for this.

"Steven Thomas" <st******@gapac .com> wrote in message
news:61******** *************** ***@posting.goo gle.com...
I have a combobox where I populate the remaining items on the screen
according to what is picked in the combobox(depend ent prompting). Is
there anyway to tell when a user looses focus on the combo versus
selected index changed?

So, say the user clicks on the combobox and types a letter to go to
the values starting with "S" the page loads, then they open the combo
and pick the value they want and the page loads a gain. I only want to
load after the user has picked the value they want???

Thanks

Nov 21 '05 #2
Thanks for the information, however it only seems to apply to the
windows form. Do you know how to handle it in the web page? ASP.NET?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 21 '05 #3
Ahh. In that case you're going to have to apply javascript to either
perform a postback onleave, or have javascript itself do whatever UI changes
you want.

You'll probably have better luck in the
microsoft.publi c.dotnet.framew ork.aspnet group. I'm not sure you're going
to like what happens when you have javascript posting back your page when
focus leaves a dropdown -- or at least, you'll have to do some work to get
around the quirks.

--
-Philip Rieck
http://philiprieck.com/blog/

-
"Steven Thomas" <st******@gapac .com> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
Thanks for the information, however it only seems to apply to the
windows form. Do you know how to handle it in the web page? ASP.NET?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 21 '05 #4

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

Similar topics

3
4275
by: Bill C. | last post by:
Hello, I know this has been discussed a lot already because I've been searching around for information the last few weeks. I'm trying to implement a DataGridComboBoxColumn class. I've found several examples on the web. They all seem to have problems, though that I've been unable to resolve. The most promising example I have found is at:
2
1019
by: Claudia Fong | last post by:
Hi, I would like to know if is possible to "know" which is the comboBox.SelectedIndex without "clicking any button". I used this int selectedIndex = comboBox2.SelectedIndex; to get the index, but it only works if this code is inside a button1_Click.
0
2382
by: tupolev | last post by:
Hi, I already post this item but now I know whats wrong: I want to allow the user to edit the items in a combobox. The problem is that the textchange event works just one time (for the first changed letter) because he reset the selectedindex of the combobox to -1. In debug mode I can't see where he does this. How can I solve this? My code sofar: contactlijst is a structure and the volgnummer is the index of the item in the combobox
1
2414
by: mike | last post by:
Hi, I'd like advice from a .NETer. I have a loadcombo routine which sets the selectedindex to -1 if it's an "add record", but then it goes to a security routine which, based on permissions sets the visible property. When the visible property is set.. 'Petition Type lblPetitionType.Visible = False
3
985
by: Dominique Vandensteen | last post by:
I posted this before but did some extra testing... combobox with 3 elements (DropDownList style) via code (button.click) I set the selectedIndex to -1 if element at index 0 is selected then everything is fine: nothing is selected after pressing the button but if element at index 1 or greater is selected and i press the button, element at index 0 is selected (uncool) i added a selectedindexchanged listener to my combobox
30
4606
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a corresponding field in the lookup table. In my data table we store the ID in what I will call the 'key' field. == Description of the desired operation:
1
3376
by: polocar | last post by:
Ciao a tutti, leggendo qua e là per il forum ho scoperto che non sono l'unico ad avere questo problema. Se si inserisce un controllo ComboBox in un form di C#, non è possibile impostare la sua altezza ad un valore diverso da 21. Forse, cambiando la dimensione del font, si potrebbe riuscire a cambiare anche l'impostazione dell'altezza... (MS farebbe comunque meglio ad introdurre per il ComboBox una proprietà AutoSize impostabile a "false"...
6
3506
by: Scotty | last post by:
Hi, I need some info How to return the value from the database My combobox Me.cboTypeAdres.Items.Add("Type Adres") Me.cboTypeAdres.Items.Add("Leverancier") Me.cboTypeAdres.Items.Add("Klant")
5
18775
by: Kevinp | last post by:
I've spent the last four hours Google searching for a way to disable items in a Combobox. I found one example in C++ which I can't get to work and another in C# that I couldn't get to work either. Does anyone have some good code for an owner-drawn combobox?
0
9687
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
9543
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,...
0
10257
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
10237
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
10029
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
5467
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...
0
5588
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4144
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
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.