Jump to content
Software FX Community

The Illusive UserCommand Event


Recommended Posts


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');


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 =




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 =


Chart1.RenderFormat =

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

cmd.Text =

"Test Command"



New ToolBarItem(1))

Client-side code:


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

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.

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...