Hi,
I have added a custom command in the chartfx toolbar and I want to call some server side code on the click of that custom command.I have tried triggering UserCommand Event.But it is not working.
The code I am using to trigger the event is given below
protected void chartFxReport_UserCommand(object sender, CommandUIEventArgs e){
if (e.CommandId == MyCustomCommandId){chartFxReport.BackColor = System.Drawing.
Color.Red;} }
In the below code I am adding custom command to the toolbar.
private void AddUserCommand() {
Command command = new Command(MyCustomCommandId);
System.Drawing.Bitmap buttonImage = new System.Drawing.Bitmap(ImagePath);int imageIndex = chartFxReport.Commands.AppendImage(buttonImage); command.ImageIndex = imageIndex; command.Enabled = true; chartFxReport.Commands.Add(command); command.GeneratePostBack = true; chartFxReport.ToolBar.Insert(0,
new ToolBarItem(MyCustomCommandId));chartFxReport.UserCommand += new CommandUIEventHandler(chartFxReport_UserCommand);
} Is there any other way to trigger the UserCommand Event ?
Thanks in advance.
Veena