markus01 Posted January 29, 2010 Report Share Posted January 29, 2010 I try to add a user command to series context menu. But menu item doesn't appear. I do the same with ChartFX for Windows Forms and there it works. Is it not supported in web version ? Version 7.0.3306.26568 Here's my code: ChartFX.WebForms.Command contextMenu = Chart1.Commands[ChartFX.WebForms.CommandId.ContextMenuSeries]; //add Drilldown itembaseCommand = new ChartFX.WebForms.Command(2222);baseCommand.Text = "Drilldown";baseCommand.Style = ChartFX.WebForms.CommandStyles.ShowTextOnly;baseCommand.ImageIndex = -1;baseCommand.Enabled = true;Chart1.Commands.Add(baseCommand);contextMenu.SubCommands.Add(baseCommand.ID); Regards, Markus Quote Link to comment Share on other sites More sharing options...
Frank Posted January 29, 2010 Report Share Posted January 29, 2010 It may be a timing issue. Where in the page lifecycle are you executing this code? Make sure it is done before any rendering occurs. If you are already doing it in an event that's prior to any rendering, please post a sample app that reproduces the problem. Your code works on my end when I paste it in my Page_Load handler. Quote Link to comment Share on other sites More sharing options...
markus01 Posted February 4, 2010 Author Report Share Posted February 4, 2010 Ok, when I do it in Page_Load it works. But I want to change the context menu content when a user click on a user command. It is not possible to remove or add any commands to context menu when after it was rendered the first time. As an alternative I tried to disable commands but this is not possible also. I need it for drilldown feature. If user clicks on a sub command of "Drilldown" in context menu. I change chart data and accordingly the available sub commands ( drilldown options ) should change. But context menu could not be changed Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.