Creating reports and dashboards | Stimulsoft community forum
Reporting tool and data analytics tools for creating reports and dashboards in ASP.NET, ASP.NET MVC, .NET Core, Blazor, Angular, PHP, Python, WPF, JavaScript, and Java applications.
Just installed the newest version (2008.2.300 from 5 October) and it looks amazing!
I got just a little problem disabling menu and toolbar items (with the StiDesignerControl)...I'm using this code:
Thanks for your reply. I create the control now on the fly and add it to the controls collection of my usercontrol; but unfortunately this changes nothing.
I got the same problems as before (icons not disabled or toolbars freezing).
StiMainMenuService mainMenuService = StiMainMenuService.GetService();
mainMenuService.ShowFileReportSave = false;
mainMenuService.ShowFilePageSaveAs = false; // doesn't work in ribbon style anyway
StiDesigner.DontAskSaveReport = true;
StiDesigner.SavingReport += new StiSavingObjectEventHandler(StiSavingDocument);
report = new StiReport();
report.Designer = new StiDesigner();
report.Designer.UseAliases = false;
which (don't ask me why exactly the last two lines were necessary) disabled the save-buttons of my form2.stidesignercontrol1 when i assigned report to form2.stidesignercontrol1.Report over a setter and form2.showed it. in standalone-designer i was not able to get this running (disabling buttons).
but now i'm trying to enable the save-buttons fromout form2 again in certain circumstances (e.g. after a save-as processed). unfortunately i don't have much experience with services and am wondering when/how to do this.
ps: reading all these comments that all didn't work when i tried it out tell me that it might not be very easy to disable/enable the save buttons as one wants at runtime. also a comment whether this is supported or not would be helpful.
pps: the main problem is: each time this code in the constructor is processed
public DesignerForm()
{
InitializeComponent();
StiStandardToolbarService.GetService().ServiceEnabled = false;
StiMainMenuService.GetService().ServiceEnabled = false;
StiConfig.Services.Add(toolbarService);
StiConfig.Services.Add(mainMenuService); StiConfig.Save();
}
StiStandardToolbarService toolbarService = StiStandardToolbarService.GetService();
StiMainMenuService mainMenuService = StiMainMenuService.GetService();
the designerform will jump to the dispose method after assigning a report to it
public void assignreport(StiReport r)
{
this.stiDesignerControl1.Report = r;
this.stiDesignerControl1.ReportFileName = r.ReportName;
}
even if you take the code out again, the services block up something... that means on vista i'm dependant on system restore now to continue developing and would like to know the exact solution or "not possible to disable save-button while designerform is shown" by you.