List Info

Thread: C-Sharp (C#) Group: Assigning EventHandlers from code behind




C-Sharp (C#) Group: Assigning EventHandlers from code behind
country flaguser name
United States
2007-07-17 14:19:37
Hey there,

I have an object on whose databound event I want it to call
a certain
method called 'dbound'

protected void Page_Load(object sender, EventArgs e)
{
............
Chart1.DataBound += new System.EventHandler(this.dbound);
.........
}

protected void dbound(object sender, EventArgs e)
{
....
}

However, my dbound event is not being called. I'm not very
familiar
with this. How do I get Chart1 to called dbound on its
databound
event? Thanks


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharpgooglegroups.com
To unsubscribe from this group, send email to
C_Sharp-unsubscribegooglegroups.com
For more options, visit this group at http://g
roups.google.com/group/C_Sharp?hl=en
-~----------~----~----~----~------~----~------~--~---


C-Sharp (C#) Group: Re: Assigning EventHandlers from code behind
user name
2007-07-17 14:37:25
You should hook up EventHandler methods in the OnInit method.  Most pages have an auto-generated method called InitializeComponent, but if not, then you can just put it directly in OnInit.
 
If you're still having issues after doing this, then it most likely means that the DataBound event is not firing

 
On 7/17/07, jobo < jobowoogmail.com">jobowoogmail.com> wrote:

Hey there,

I have an object on whose databound event I want it to call a certain
method called 'dbound'

protected void Page_Load(object sender, EventArgs e)
{
............
Chart1.DataBound += new System.EventHandler(this.dbound);
.........
}

protected void dbound(object sender, EventArgs e)
{
....
}

However, my dbound event is not being called. I'm not very familiar
with this. How do I get Chart1 to called dbound on its databound
event? Thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharpgooglegroups.com
To unsubscribe from this group, send email to C_Sharp-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/C_Sharp?hl=en
-~----------~----~----~----~------~----~------~--~---

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )