icegunner Posted December 6, 2007 Report Share Posted December 6, 2007 I have created a server control for my app and in that control I'm creating an UpdatePanel and adding controls to it. One of the controls I'm adding is a chart in image format. Everything in the update panel (i.e. check box, listbox, buttons) all cause a partial postback except for the chart. When I click on the chart, it causes a full postback. The nearest I can figure here is that the ID that the SFX_PostBack() is using doesn't contain the ID of the update panel it has been added to and therefore AJAX assumes a full postback. Since the buttons and such also in the control are <input> controls, they are handled by a different AJAX method than the __doPostBack that gets called by the chart's click. So, my question is how do I get around this so that the chart click doesn't cause a full postback? Cheers, Gunner Quote Link to comment Share on other sites More sharing options...
Frank Posted December 6, 2007 Report Share Posted December 6, 2007 What's the build of the Chart FX assembly you are using? I believe you are experiencing a problem that was fixed long time ago. Please make sure you are using the latest Service Pack. Quote Link to comment Share on other sites More sharing options...
icegunner Posted December 6, 2007 Author Report Share Posted December 6, 2007 I'm currently using version 7.0.2664.18534. Quote Link to comment Share on other sites More sharing options...
Frank Posted December 6, 2007 Report Share Posted December 6, 2007 Yeah. That's a pretty old one, older than ASP.NET AJAX. Please download the latest Service Pack (7.0.2845.31164) from our support site. Quote Link to comment Share on other sites More sharing options...
icegunner Posted December 6, 2007 Author Report Share Posted December 6, 2007 Didn't seem to change a thing. Same script for the click with the same ID being passed. No change at all. I don't think this is what you think it is. Quote Link to comment Share on other sites More sharing options...
Frank Posted December 6, 2007 Report Share Posted December 6, 2007 Please post a sample app that rperoduces the problem. Quote Link to comment Share on other sites More sharing options...
icegunner Posted December 10, 2007 Author Report Share Posted December 10, 2007 Attached is a very basic version what I have that is causing the problem. My code is actually pretty extensive, so I tried to weed out all the unecessary parts to reproduce the problem. There is no method to insert data or anything like that. Very stripped down. The "Class2" control can be added to an ASPX page to complete the deal. What you'll notice is that when the page is brought up, the clickable links in the chart are in the form of "javascript:SFX_PostBack(Class2$drillDownChart$FXChart, args)" The problem is that the UniqueID that is created for the chart and put into the SFX_PostBack() method does not contain the update panel ID. As a result, when the __doPostBack() method is called and AJAX intercepts the postback, it doesn't know that the chart is actually located in the update panel. Hope this helps... Cheers, Chris Quote Link to comment Share on other sites More sharing options...
ash_softwarefx Posted December 12, 2007 Report Share Posted December 12, 2007 Try setting UseCallbackForEvents to true ... It will lead to chartFX sending partial postback rather than causing whole page to get posted back Quote Link to comment Share on other sites More sharing options...
Frank Posted December 12, 2007 Report Share Posted December 12, 2007 Setting UserCallBacks to true will certainly do it, however this may not be good for you if you are changing objects other than the chart in your event handler. I was unable to reproduce the problem with the code you sent me. I tried with my own project adding a chart inside an update panel and the events sent by the chart don't cause a whole page update, they work as expected. So this must be something specific to your application. Please include a complete ASP.NET Web Project that reproduces the problem. Since you are creating all these controls in code (as opposed as markup) I suspect the error has to do with some control in the hierarchy not being assigned an ID. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.