Jump to content
Software FX Community

The Illusive UserCommand Event


Kjell

Recommended Posts

Oki

I have done everything I can think of to get that usercommand event running on the clientside. And I cannot for the life of me get it going (.NET RenderFormat).

The usercommand event triggers without problem on the server side.

I have granted the assemblies full trust. I am running in a full trust intranet zone.

I have tried attaching a handler as suggested:

<

script type="text/javascript" for="MyChart" event="UserCommand(sender,eventargs)">alert('Test');

</script>

And I tried attaching using javascript via attachEvent and addEventListener...

 And the events don't seem to be triggered. What am I doing wrong?

 I have added a Command like so:

Dim cmd As ChartFX.WebForms.Command

cmd =

New ChartFX.WebForms.Command(20)

cmd.Text =

"Test"

MyChart.Commands.Add(cmd)

MyChart.ToolBar.Insert(0,

New ChartFX.WebForms.ToolBarItem(20))

 

Anyone who can help?

 

Link to comment
Share on other sites

I am unable to replicate this problem. The UserCommand gets fired as expected. Please make sure that the .NET Framework Trust is set to "Full Trust" for My Computer, Intranet, and Trusted Sites. Also, make sure that your Internet Browser is allowed to execute JavaScript code. Below is the code I used:

Server-side code:

Chart1.ToolBar.Visible =

True

Chart1.RenderFormat =

".NET"Dim cmd As Command cmd = New Command(1)

cmd.Text =

"Test Command"

Chart1.Commands.Add(cmd)

Chart1.ToolBar.Insert(0,

New ToolBarItem(1))

Client-side code:

<

script language="javascript" for="Chart1" event="UserCommand(obj,args)">alert("Test Command Fired!");

</script>
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...