Jump to content
Software FX Community

UserCommand and .NET rendering


Gabriel

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.

Default.aspx:

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

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

  <form id="form1" runat="server">
  <div>
  <chartfx7:Chart ID="Chart1" runat="server">
  </chartfx7:Chart>  
  </div>
  </form>
</body>
</html>
 

Default.aspx.vb: 

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
  Chart1.ToolBar.Clear()

  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

Archived

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

×
×
  • Create New...