Jump to content
Software FX Community

Dynamic Chart Error - the target for ctl00$MainContent$Ct0l for the callback could not be found or did not implement ICallbackEvent Handler


russ_uk

Recommended Posts

Hi, 

We are dynamically creating several charts and adding them to a place holder control via a postback event.  However, when we try and use any of the inbuilt Ajax options the following error is displayed within IE.

'the target for ctl00$MainContent$Ct0l for the callback could not be found or did not implement ICallbackEvent Handler ' 

The chart images settings has been set to interactive and we have not tried to implement our own Ajax methods, though we do use another Ajax control on the page. Reading some of the other posts you recommend creating the charts within CreateChildControls, so I also tried creating the charts within CreateChildControls but the same error still occurs.

Any pointers on this would be great!

Cheers Russ

Link to comment
Share on other sites

After further investigation we have discovered that adding another user control to the page within a different method to the chart panel causes this error to occur.

If we add the chart panel and the other user control together in page load or create child controls the page functions as expected. However, if we add the user control in page load and the chart panel in create child controls the above error re-appears.

 Any advice on the restirctions when using the ChartFX Control would be great.

Cheers

Russ

 

 

Link to comment
Share on other sites

Hi Frank,

Thanks for taking the time to reply,

 Attached is a test project that highlights the issue.  If you click on any of the toolbar buttons the error message is displayed.

We are using the latest service pack and if you add a custom name to the chart, this name is simply displyed in the error message.

Cheers

Russ

Link to comment
Share on other sites

Hi Frank,

After a good nights sleep I saw the issue straight away.  As ChartFX re-loads the page when using 'Ajax' the dynamic chart was not being re-created and added to the tree, hence it did not exist.  Adding an empty chart to the tree resolved this issue.

However, it would be great if you could confirm if it is possible to configure ChartFX to not make an ajax call directly to the controls holding page.  This for me is a major drawback, most of our pages have two or three third party controls plus our home grown components. 

Having ChartFX making a call against the page (that contains various non state ajax controls) is a real pain in the ar** and to be honest I can't understand why you call the page?  A simple http handler that receives and processes the ChartFX Ajax requests, to me, would make better sense.

Again, I'm hopping that I'm missing part of the picture and a simple configuration / code change will stop ChartFX using the controls page.

Many thanks for your time.

Russ

Link to comment
Share on other sites

At this time the only mechanism that Chart FX can use to go back to the server is through the control's CallBack.

In many situations such as internal commands that have no interaction with anything else on the page, we realize there is no need for this overhead. However, if the page is coded correctly unnecessary processing is not done on postbacks/callbacks the performance hit should be minimal. In fact the only thing that is necessary for the callback to work is that the tree is rebuilt with (dummy) controls.

We are (always) working in the new version of Chart FX and in this version we provide more efficient mechanisms for client-server interaction that do not require the page tree to be reconstructed. These are used for internal commands and actions. In situations where your code needs to be executed however (event handlers) the page needs to be reconstructed. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...