combox problem on selectIndexChanged

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • VIJAY KUMAR

    #1

    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_sel ectedindexChang ed 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
    selectindexchan ged on form load?
  • Cor Ligthert

    #2
    Re: combox problem on selectIndexChan ged

    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
    [color=blue]
    >
    > I have a problem with combobox. I have 2 comboxes cmbcategory and
    > cmbsubcategory.
    >
    > I intialized cmbcategory with sum values from database on[/color]
    Form_Load.[color=blue]
    > 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_sel ectedindexChang ed calling number of times that i have a[/color]
    values[color=blue]
    > in that combox.
    >
    > How to avoid to call that no.of times or how to avoid calling
    > selectindexchan ged on form load?[/color]


    Comment

    Working...