473,322 Members | 1,379 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,322 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 1422
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
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...
1
isladogs
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...
0
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
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...
1
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....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.