By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 985 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

combox problem on selectIndexChanged

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.