473,388 Members | 1,256 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

combox problem on selectIndexChanged

Hi all,

I have a problem with combobox. I have 2 comboxes cmbcategory and
cmbsubcategory.

I intialized cmbcategory with sum values from database on Form_Load.
when i select a vlue from the cmbcategory, i will get sub categories in
cmbsubcategory.

on Form load when ever cmbcategory is initializing its automatically
cmbcategory_selectedindexChanged calling number of times that i have a values
in that combox.

How to avoid to call that no.of times or how to avoid calling
selectindexchanged on form load?
Jul 21 '05 #1
1 1428
Vijay,

That behaviour is anoying however normal.

There are 2 solutions,
set the handler by code at the end of the load event
use a switch that you set to true at end of the load event and test for
that in the event selected index change if it is true.

I hope this helps?

Cor

I have a problem with combobox. I have 2 comboxes cmbcategory and
cmbsubcategory.

I intialized cmbcategory with sum values from database on Form_Load. when i select a vlue from the cmbcategory, i will get sub categories in
cmbsubcategory.

on Form load when ever cmbcategory is initializing its automatically
cmbcategory_selectedindexChanged calling number of times that i have a values in that combox.

How to avoid to call that no.of times or how to avoid calling
selectindexchanged on form load?

Jul 21 '05 #2

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

Similar topics

0
by: raj | last post by:
Please Help with the combox DisplayValue property private void cboClient_SelectionChangeCommitted(object sender, System.EventArgs e) { String strSQL; strSQL = "SELECT F.FollowUpPerson FROM...
4
by: Charles A. Lackman | last post by:
Hello, I have a combox that I am trying to get to work in the following fashion. As you type in the combox that the item that matches what you are type is selected. as you type a last name:...
3
by: Alpha | last post by:
This is a Window based application. How do I get my combox listing to display in sorted order by DataMember? I inserted a blank row to the dataset table which is the datasrouce for the comboBox...
2
by: Alpha | last post by:
I have a window application. On one of the form, there is a listbox and a few combox. The lstSchItem has a dataview as a datasource. The comboxes are bind to its selected value but through the...
1
by: SQL | last post by:
Hi, on my aspx page, I want to enable a textbox, when a certain item in a dropdown is selected. I thought I could do this by adding code the the dropdown's SelectIndexChanged event, but that...
1
by: VIJAY KUMAR | last post by:
Hi all, I have a problem with combobox. I have 2 comboxes cmbcategory and cmbsubcategory. I intialized cmbcategory with sum values from database on Form_Load. when i select a vlue from the...
2
by: wallermj | last post by:
I want to be able to compare the old combobox index to the newly selected combobox index in the SelectIndexChanged event. How can I do that? I know I could store the last selected value for the...
1
by: neo1ra | last post by:
Hi, I'm doing a search combox to pop up and specific record. Everything is working fine until I make a change to the record that I'm working on and try to move to other record. A error message...
1
by: dewgan | last post by:
I have a form with a combox box where the list is populated via a linked table. This works fine. I have a text box that is filled with the name selected in the combox box. That name is then added...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...

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.