JJViljoen Posted July 10, 2007 Report Posted July 10, 2007 Why do the chart events stop firing when the chart render mode is set to ".NET"? Specified client side methods also does not work? (Chart FX for visual studio 2005)
Pete Posted July 10, 2007 Report Posted July 10, 2007 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.
Frank Posted July 10, 2007 Report Posted July 10, 2007 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.
Magnus Salgo Posted July 10, 2007 Report Posted July 10, 2007 If you have controls "outside" .Net can you be using Ajax to update the .Net Charts with out Page Postback
JJViljoen Posted July 11, 2007 Author Report Posted July 11, 2007 Where can I find a list of these client side events in order to pick them up with javascript?
Frank Posted July 11, 2007 Report Posted July 11, 2007 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;
Frank Posted July 11, 2007 Report Posted July 11, 2007 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.
Pete Posted July 23, 2007 Report Posted July 23, 2007 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.
Frank Posted July 23, 2007 Report Posted July 23, 2007 Makes sense. I will put it in as a suggestion for future versions.
Ctifl Posted October 31, 2007 Report Posted October 31, 2007 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
Frank Posted October 31, 2007 Report Posted October 31, 2007 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.
Ctifl Posted November 2, 2007 Report Posted November 2, 2007 However, you require Full-Trust in your .NET Security Settings in order for this to happen. OK, I hab bad configured .NET Framework. It works fine. Thaks for your help, Frank. Regards, Simon
Recommended Posts
Archived
This topic is now archived and is closed to further replies.