Jump to content
Software FX Community

UserCommand and .NET rendering


Recommended Posts

 I've been trying to get this to work for a little while now and I can't figure it out.  The UserCommand event doesn't fire in the javascript.  I'm sure its a minor detail I'm overlooking.

Anyway, here is the basic example that I've been working with.  Its just a simple new VB project with a chart control.  Where am I going wrong?  I should also add that I've set .NET trust settings to full trust for the appropriate zone.


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%@ Register Assembly="ChartFX.WebForms" Namespace="ChartFX.WebForms" TagPrefix="chartfx7" %>

<body >
  <script language="JavaScript" for="Chart1" event="UserCommand(sender, args)">
  <!--alert("Custom Command");-->

  <form id="form1" runat="server">
  <chartfx7:Chart ID="Chart1" runat="server">


Partial Class _Default
  Inherits System.Web.UI.Page

  Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles form1.Load
  Chart1.RenderFormat = ".NET"
  Chart1.ToolBar.Visible = True

  Dim cmds As ChartFX.WebForms.CommandCollection
  cmds = Chart1.Commands
  cmds.Add(New ChartFX.WebForms.Command(20))
  cmds(20).ImageIndex = 1
  cmds(20).Enabled = True
  cmds(20).Style = ChartFX.WebForms.CommandStyles.TwoState

  Chart1.ToolBar.Insert(0, New ChartFX.WebForms.ToolBarItem(20))

  End Sub

End Class

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