Click here to Skip to main content
13,046,660 members (69,283 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I write a code on combobox value change event. I want to execute it only when I change my combobox value manually. But whenever I write code e.g. cmb1.text="" . At that instance the combobox change value event is executed. But I don't want it. I want it to execute only when I change the combobox value by clicking on that combobox.
Posted 22-Nov-12 2:00am
Krunal R 22-Nov-12 8:04am
Can show show your code, so that I got more idea for your query ??
smp 234 22-Nov-12 8:15am
Only want to execute that event when I click on combo box and change value manually.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

The SelectedIndexChanged event will fire when you set the Text to a value that exists in the dropdown list part of the combobox. If it is firing when you assign an empty string then there must be an empty string in the list.

A very useful event is SelectionChangeCommitted as this is raised only when the user changes the selection and not when values are changed programmatically.


smp 234 23-Nov-12 0:41am
thanks... my problem is solved

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 22 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100