listBox1_SelectedIndexChanged

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

    #1

    listBox1_SelectedIndexChanged

    Dear all,

    Can we avoid listBox1_Select edIndexChanged from fire?

    My problem is during form load I fill listbox with employee name.

    In listBox1_Select edIndexChanged event detail information of the employee
    will fill in bind to other textbox.

    I think when form load the listBox1_Select edIndexChanged event might fired
    automatically, am I right?
    If so how can I avoid it from fire auto when form loading.

    Regards,
    Kun


  • Benny Mathew

    #2
    Re: listBox1_Select edIndexChanged

    Hi,
    Use a Boolean class variable IsFill and set it to true initially, in the
    listBox1_Select edIndexChanged event if the flag is true just exit

    If Not IsFill Then
    'do the required stuff
    End If


    Cheers
    Benny

    Kun wrote:
    [color=blue]
    > Dear all,
    >
    > Can we avoid listBox1_Select edIndexChanged from fire?
    >
    > My problem is during form load I fill listbox with employee name.
    >
    > In listBox1_Select edIndexChanged event detail information of the employee
    > will fill in bind to other textbox.
    >
    > I think when form load the listBox1_Select edIndexChanged event might fired
    > automatically, am I right?
    > If so how can I avoid it from fire auto when form loading.
    >
    > Regards,
    > Kun
    >
    >[/color]

    Comment

    Working...