Gabriel Posted June 14, 2007 Report Share Posted June 14, 2007 I have written code that generates a user callback event from javascript when an html button is pressed. The desired effect does occur (for example, if the button should cause a line to become invisible, it does) but any changes made using the toolbar buttons are undone. As an example, say the 3D toolbar button is pressed, the lines become 3D, not a problem. Once the user callback is performed, the effects of the user callback are reflected in the graph but the lines become 2D again. In particular, this occurs when .NET rendering is used. Is this expected behaviour? Link to comment Share on other sites More sharing options...
Frank Posted June 19, 2007 Report Share Posted June 19, 2007 This one was tricky! The problem is that the changes made in the client are not seen by the ASP.NET callback framework. In order to fix this problem, you need to do either of these: 1) Set Chart.UseCallBackForEvents to true. The client component will see this and automatically refresh the Callback Data when a change is made. 2) Call SFX_RefreshCallbackData before calling SFX_SendUserCallback Link to comment Share on other sites More sharing options...
Gabriel Posted June 19, 2007 Author Report Share Posted June 19, 2007 Yes, this one is tricky indeed. lol. I tried both suggestions and neither worked. Following the example in the first post the lines became 2D again even though UseCallBackForEvents is set to true or/and SFX_RefreshCallbackData() is called before SFX_SendUserCallback. Am I maybe missing something? Or do you have any other suggestions? I have installed the latest service pack for chartfx7. Gabriel Link to comment Share on other sites More sharing options...
Frank Posted June 19, 2007 Report Share Posted June 19, 2007 The only other think I can think of is Trust. The .NET Control needs full trust in order to interact with the DOM (required to store the state). Make sure the .NET security settings are set to full-trust for this control/zone. Both of the solutions work on my end. Link to comment Share on other sites More sharing options...
Gabriel Posted June 19, 2007 Author Report Share Posted June 19, 2007 The issue was in the security settings. Thanks for you help Gabriel Link to comment Share on other sites More sharing options...
Frank Posted June 23, 2007 Report Share Posted June 23, 2007 Glad to help. Link to comment Share on other sites More sharing options...
JJViljoen Posted July 10, 2007 Report Share Posted July 10, 2007 I had the same problem and solved it thanks to you guys except for one thing: The zoom toolbar button. Whenever the html button(to refresh the chart) is pressed it does not remember the zoom position and un-zooms? Do you have any suggestions on this? hannes Link to comment Share on other sites More sharing options...
Frank Posted July 13, 2007 Report Share Posted July 13, 2007 The Zoom State is not part of the chart client state and it is lost upon postback. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.