This question is locked. New answers and comments are not allowed.
I have been fighting with this problem for awhile now, and I can't solve it. I have created a wrapper Silverlight application which contains a RadChart and exposes some functions via the HTML bridge so that I can set the collections from javascript after an AJAX call to our server to get data.
If I set the data outside of the AJAX callback (ie. hardcode it), the chart is updated correctly. If I move the update inside the AJAX callback, then the chart is NOT updated (it sits in a NO DATA state). I have set breakpoints in my bridge functions and I know that those functions ARE being called with the correct data in the AJAX call, however, the chart state appears to remain unchanged.
Is there a way to manually force the chart to update?
Thank you!
Below is some pseudo code of what I mean...
If I set the data outside of the AJAX callback (ie. hardcode it), the chart is updated correctly. If I move the update inside the AJAX callback, then the chart is NOT updated (it sits in a NO DATA state). I have set breakpoints in my bridge functions and I know that those functions ARE being called with the correct data in the AJAX call, however, the chart state appears to remain unchanged.
Is there a way to manually force the chart to update?
Thank you!
Below is some pseudo code of what I mean...
| var myControl = // Pointer to the Silverlight Control |
| function getData() |
| { |
| var fakedata = "..."; |
| // If I put the update here, the chart refreshes |
| myControl.myBridgeFunctionUpdate(fakedata); // This will work. |
| $.ajax(... |
| function() |
| { |
| // Even if all I do is use the same fake data here. |
| var samefakedata = "..."; |
| myControl.myBridgeFunctionUpdate(samefakedata); // This will NOT work. |
| } |
| ); |
| //... |
| } getData(); |