Jump to content
Software FX Community

Call back event failed


ryanlcs

Recommended Posts

Hi

I have this code, which I wanted to enable the scroll bar on checked of a check box. But when I checked the check box, I get prompted for this error: refer to attached. Saying the target 'Charts' for callback could not be found.

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Charts.Gallery = Gallery.Bar

Charts.UseCallbacksForEvents =

True

Charts.Data.Clear()

Charts.BackColor = System.Drawing.Color.LightGray

Charts.Background =

NothingCharts.PlotAreaColor = System.Drawing.ColorTranslator.FromHtml("#FFFFCC")

Charts.LegendBox.Dock = DockArea.Top

Charts.RenderFormat =

".Net"AddHandler Charts.UserCallback, AddressOf ChartFX_UserCallback

chkEnableScrollbar.Attributes.Add(

"OnClick", "Feed1(" & Application("waitingSeconds") & ")")

End

Sub

 

Protected Sub ChartFX_UserCallback(ByVal sender As Object, ByVal e As ChartFX.WebForms.UserCallbackEventArgs)

If e.Param = "1" Then

sender.AxisX.AutoScroll =

True

sender.AxisX.PixelsPerUnit = 17

sender.AxisX.ScrollPosition = sender.AxisX.ScrollSize

Else

sender.AxisX.AutoScroll =

False

End If

End Sub

 

Javascript code:

function Feed1(waitingseconds)

{

document.getElementById("chkEnableScrollbar").disabled = true;if (document.getElementById("chkEnableScrollbar").checked == false)

{

scrollchecked = 0;

milisecond = 10;

}

else

{

scrollchecked = 1;

milisecond = waitingseconds;

}

 

setTimeout('Callback_Relay(' + scrollchecked + ')', milisecond);

}

function Callback_Relay(intScrollchecked)

{

SFX_SendUserCallback("Charts",intScrollchecked,false);

document.getElementById(

"chkEnableScrollbar").disabled = false;

}

 

Link to comment
Share on other sites

 hmmm. Im going to try run your code. meanwhile, you can check the last post of this thread. I posted a sample application in C# that shows how to to this and it working well. So, you can by the moment you can check it out while i get your code. http://community.softwarefx.com/forums/p/10500/25656.aspx#25656

 Also, can you please post the aspx page code you define to declare the chart?

 Juan.

Link to comment
Share on other sites

hi..

This is how I declare the chart:

Dim Charts As New ChartFX.WebForms.Chart

Actually, I got this problem solved. I forget to assign the "Charts.ID = Charts".

But now, another problem arise. When I click on the checkbox, nothing happen. No error message prompted whatsoever. Just nothing happen.

Thanks.

Link to comment
Share on other sites

Hi,

 

you can open Internet explorer -> Tools -> Options

-> Security [Trusted Sites] and configure ActiveX controls and plugins so

they can have enough access and permissions.

 

You can also use caspol to set permissions like this:

open a visual studio command prompt or navigate (with CD command) :

cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

you can also set Full trust to all in the internet zone.

caspol -machine -chggroup Internet_Zone FullTrust

 

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.

×
×
  • Create New...