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
 
Back
Top