Jump to content
Software FX Community

User Callback and .NET Rendering


Gabriel

Recommended Posts

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

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

 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

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

  • 3 weeks later...

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...