Saturday, March 31, 2012

System.EventHandler created but event not fired

I'm having this exact same problem:

http://groups.google.com/group/micr...d072e420a5a96ea
I'm having problems with dropdownlists in a random fashion, some of
them work, and some dont, and the code for eventhandler binding is
there.

for example:

private void InitializeComponent()
{
this.cbBranches.SelectedIndexChanged += new
System.EventHandler(this.cbBranches_SelectedIndexC hanged_1);
..
..
..
}

SelectedIndexChanged_1 never gets called
anyone ever solved this?Make sure InitializeComponent is being called. (breakpoint)

Are you setting the AutoPostBack property to True?

If you set it to false, then the code will only run when you do a postback
(which could be several different things triggering a postback)

<lauralucas@.gmail.comwrote in message
news:1154448495.232168.8670@.s13g2000cwa.googlegrou ps.com...

Quote:

Originally Posted by

I'm having this exact same problem:
>
>


http://groups.google.com/group/micr...d072e420a5a96ea

Quote:

Originally Posted by

>
I'm having problems with dropdownlists in a random fashion, some of
them work, and some dont, and the code for eventhandler binding is
there.
>
for example:
>
private void InitializeComponent()
{
this.cbBranches.SelectedIndexChanged += new
System.EventHandler(this.cbBranches_SelectedIndexC hanged_1);
.
.
.
}
>
SelectedIndexChanged_1 never gets called
anyone ever solved this?
>


AutoPostBack property!!! that was it!! thanks a lot!! =D
sloan wrote:

Quote:

Originally Posted by

Make sure InitializeComponent is being called. (breakpoint)
>
Are you setting the AutoPostBack property to True?
>
If you set it to false, then the code will only run when you do a postback
(which could be several different things triggering a postback)
>
>
>
>
<lauralucas@.gmail.comwrote in message
news:1154448495.232168.8670@.s13g2000cwa.googlegrou ps.com...

Quote:

Originally Posted by

I'm having this exact same problem:


http://groups.google.com/group/micr...d072e420a5a96ea

Quote:

Originally Posted by


I'm having problems with dropdownlists in a random fashion, some of
them work, and some dont, and the code for eventhandler binding is
there.

for example:

private void InitializeComponent()
{
this.cbBranches.SelectedIndexChanged += new
System.EventHandler(this.cbBranches_SelectedIndexC hanged_1);
.
.
.
}

SelectedIndexChanged_1 never gets called
anyone ever solved this?


You should go post your new found knowledge at that other post.

To keep making the world a better place.

<lauralucas@.gmail.comwrote in message
news:1154453257.813172.113540@.b28g2000cwb.googlegr oups.com...

Quote:

Originally Posted by

AutoPostBack property!!! that was it!! thanks a lot!! =D
sloan wrote:

Quote:

Originally Posted by

Make sure InitializeComponent is being called. (breakpoint)

Are you setting the AutoPostBack property to True?

If you set it to false, then the code will only run when you do a


postback

Quote:

Originally Posted by

Quote:

Originally Posted by

(which could be several different things triggering a postback)

<lauralucas@.gmail.comwrote in message
news:1154448495.232168.8670@.s13g2000cwa.googlegrou ps.com...

Quote:

Originally Posted by

I'm having this exact same problem:
>
>



http://groups.google.com/group/micr...d072e420a5a96ea

Quote:

Originally Posted by

Quote:

Originally Posted by

Quote:

Originally Posted by

>
I'm having problems with dropdownlists in a random fashion, some of
them work, and some dont, and the code for eventhandler binding is
there.
>
for example:
>
private void InitializeComponent()
{
this.cbBranches.SelectedIndexChanged += new
System.EventHandler(this.cbBranches_SelectedIndexC hanged_1);
.
.
.
}
>
SelectedIndexChanged_1 never gets called
anyone ever solved this?
>


>

0 comments:

Post a Comment