aarnovitz Posted March 26, 2007 Report Share Posted March 26, 2007 I have a web page with a placeHolder control on it. I create the chart, add it to the placeholder and the graph is displayed properly. Howvever, when I try to right click and select a menu item, I get an IE error that states: "The target 'Chart1' for the callback could not be found or did not implement ICallbackEventHandler." I used the following code to create the chart: Chart Chart1 = new Chart();Chart1.ID = "Chart1";Chart1.UserCommand += new CommandUIEventHandler(UserChartCmd);PlaceHolder1.Controls.Add(Chart1); | | protected void UserChartCmd(object sender, CommandUIEventArgs e){....} What did I miss? Link to comment Share on other sites More sharing options...
Frank Posted March 27, 2007 Report Share Posted March 27, 2007 Where are you doing this code? If I do it in CreateChildControls it works fine. Maybe you are doing it too late (Form Load)? By the time the viewstate is loaded and the callback call gets to the page the chart needs to be in the control tree. This is true for any control that generates an event, not just the chart. Link to comment Share on other sites More sharing options...
aarnovitz Posted March 27, 2007 Author Report Share Posted March 27, 2007 That works - problem solved Link to comment Share on other sites More sharing options...
Frank Posted March 28, 2007 Report Share Posted March 28, 2007 Excellent! Link to comment Share on other sites More sharing options...
aruni Posted September 20, 2007 Report Share Posted September 20, 2007 Hi, I started using Chart FX 2days before and I am stuck in the same place. I just want to know how can I load the chart in CreateChildcontrols dynamically. Can you please guide me how to do that? (without using the design mode) Thanks a lot in advance....... Link to comment Share on other sites More sharing options...
Frank Posted September 20, 2007 Report Share Posted September 20, 2007 The issue in this post was that he was NOT doing it in CreateChildControls, he was doing it too late. If you create the chart in CreateChildControls and add it to the controls collection of the page (or parent control) there is nothing special you need to do. What kind of problems are you having? Link to comment Share on other sites More sharing options...
aruni Posted September 23, 2007 Report Share Posted September 23, 2007 Hi, Actually I think I am having the problem in testing. How can I test this using another site in VS2005? Which methid I should call in the application in order to check whether the chart is creating as needed. The thing is I need this charts to be loaded in MOSS 2007 as web parts. But before that I need to test whether its' ok using another site. Can u pls guide me? Thanks a lot !!!!!!!!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.