combox problem on selectIndexChanged

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top