Hi,
I am trying to resize my chart when the page load. Here is the code I have right now:
JavaScript:
VB:
ResizeChart() is called on the onresize event on the Body and it works! But when it's called with the jQuery "$(document).ready" my variable ajaxManager is null, so I understand that the RadAjaxManager is not loaded at this time. How can I call ResizeChart() on the load of the RadChart? I can't find any ClientEvent for the RadChart.
Thanks.
I am trying to resize my chart when the page load. Here is the code I have right now:
JavaScript:
$(document).ready(ResizeChart());function ResizeChart(){ var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>"); var arg1 = $(document).width(); var arg2 = 305; ajaxManager.ajaxRequest(arg1 + "," + arg2);}VB:
Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest Dim argument As String = e.Argument Dim sArray As String() = argument.Split(",".ToCharArray()) chartLabos.Width = CInt(sArray(0)) chartLabos.Height = CInt(sArray(1))End SubResizeChart() is called on the onresize event on the Body and it works! But when it's called with the jQuery "$(document).ready" my variable ajaxManager is null, so I understand that the RadAjaxManager is not loaded at this time. How can I call ResizeChart() on the load of the RadChart? I can't find any ClientEvent for the RadChart.
Thanks.