Jump to content
Software FX Community

".NET" render mode


JJViljoen
 Share

Recommended Posts

Same problem over here.  Not sure about the original question, but I'm trying to capture a number of events on the server side, such as GetAxisLabel and AttributesChanged.  When it is rendered as an image, these events are fired.  But they don't get fired when rendered as .NET.

My initial thought was trust settings still being messed up, but I am able to capture the Click event on the server, which I hadn't been able to prior to enabling full trust.

Link to comment
Share on other sites

When using the .NET client, the chart is rendered in the client, not the server.

Events such as GetAxisLabel, are fired during the drawing of the chart, going back and forth from the client to the server for each axis label would be unpractical. These events are fired in the client and can be captured using Java Script.

Only a few events: Click, Personalized. Are sent across from the client to the server.

post-2196-13922400416921_thumb.jpg

Link to comment
Share on other sites

We do use AJAX for our commands, only the chart is updated after a command form either the toolbar or menus is executed. You can also make the Click and other vents to be sent via Callback instead of Postback by setting:

chart.UseCallbacksForEvents = true;

post-3100-13922400418897_thumb.jpg

Link to comment
Share on other sites

The client-side events are the same as the events in the windows forms control. The .NET client is after all a Windows Form control.

You can find these event is the Chart FX documentation.

Note: Full-trust is required for the .NET Client to send events to your JavaScript.

Link to comment
Share on other sites

  • 2 weeks later...

While I can understand wanting to avoid server callbacks, there are several places in our code where we are going to need a server round trip.  For instance, I'm adding a custom command to the series context menu that needs to be processed server side.  I'm getting the javascript UserCommand event fine and dandy, but now I have to make an AJAX call from javascript anyway.  Whether I'm doing a straight AJAX call or using SFX_SendUserCallback, I'm still going to have to muck around with javascript and munge some strings so I can pass the eventargs back to the server, which is irritating.

It seems like it'd be preferable to allow the developer the option of generating server side events.  It would make my life easier if I could catch these things in the server directly without jumping through these hoops.

Link to comment
Share on other sites

  • 3 months later...

We do use AJAX for our commands, only the chart is updated after a command form either the toolbar or menus is executed. You can also make the Click and other vents to be sent via Callback instead of Postback by setting:

chart.UseCallbacksForEvents = true;

 

Hi,

I'm a french user of ChartFX 7.0. I'm not sure I understand the answer to that question.
 

I have a similar problem. That is :

I'm creating a chart in a webform, with .Net RenderFormat. I'm trying to catch the Chart.Click event. It works fine in Image mode but not in .Net.

Reading the forum, I understand that (tell me if I'm wrong)

  • in .Net mode, some of the events are catched in the client, but not sent to the server.
  • but the Click event is one of the events that should be sent to the server, even in .Net RenderFormat.

Is that wrong ?

I checked my .Net FrameWork configuration and it was OK. But the Click event still doesn't work.

 
Maybe I misunderstood and the Click event is never sent to the server. In that case, the solution should be to catch the client-side event in order to force the page to be posted... no ? Frank said in the post that we could use AJAX to catch those events. I tried this :

  • check if my .Net framewok was configured in 'full-trust". It seems OK.
  •  add "chart.UseCallbacksForEvents = true;". It didn't change anything.
But I'm afraid I didn't understand what "CallBack" was, comparatively with "PostBack".

 

Could you please help me ?

  • I thought that the Click event should be sent to the server and it doesn't
  • I don't understand what "CallBack" is comparatively with "PostBack"
  • even if I knew it, I don't know how to code in AJAX to send the Click event to the server
Thank you for your help.

Simon
Link to comment
Share on other sites

The click event is sent back to the server when you use the .NET Client Control.

However, you require Full-Trust in your .NET Security Settings in order for this to happen.

UseCallbacksForEvents controls whether the event is sent as a postback or as a callback but in either case it is sent to the server and captured in the same way.

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.

 Share

×
×
  • Create New...