Remove Option of the Context Menu
Posted: Fri Jan 20, 2012 9:00 am
I need remove of the Context Menu the options "New Data Source" and "New Connection" that open in sidebar Dictionary.
How I do it?
How I do it?
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.
https://forum.stimulsoft.com/
Please, try to use next code:gsabel wrote:I need remove of the Context Menu the options "New Data Source" and "New Connection" that open in sidebar Dictionary.
How I do it?
Code: Select all
StiOptions.Designer.Panels.Dictionary.ShowConnectionNewMenuItem = false;
StiOptions.Designer.Panels.Dictionary.ShowDataSourceNewMenuItem = false;
Code: Select all
StiDictionaryPanelService service = StiDictionaryPanelService.GetService(stiDesignerControl1);
service.SetDictionaryDatabaseNew(false); // Hide "New Connection..."
service.ShowBusinessObjectNewMenuItem = false; // Hide "New Business Object..."
gsabel wrote:I already tried that, but, don't work.
I can hide two items of the Context Menu with this code:
But the other properties do not work.Code: Select all
StiDictionaryPanelService service = StiDictionaryPanelService.GetService(stiDesignerControl1); service.SetDictionaryDatabaseNew(false); // Hide "New Connection..." service.ShowBusinessObjectNewMenuItem = false; // Hide "New Business Object..."
Now, I need hide the following Items:
Code: Select all
StiDictionaryPanelService service = StiDictionaryPanelService.GetService(stiDesignerControl1);
service.SetDictionaryDatabaseNew(false); // Hide "New Connection..."
service.ShowBusinessObjectNewMenuItem = false; // Hide "New Business Object..."
Code: Select all
StiOptions.Designer.Panels.Dictionary.ShowDataSourceNewMenuItem = false;
StiOptions.Designer.Panels.Dictionary.ShowEmptyBusinessObjectsCategory = false;
Code: Select all
StiOptions.Designer.Panels.Dictionary.ShowConnectionNewMenuItem = false;
StiOptions.Designer.Panels.Dictionary.ShowDataSourceNewMenuItem = false;
We are always glad to help you.gsabel wrote:Hi.
These properties functionedThat I was using this in the wrong place heheCode: Select all
StiOptions.Designer.Panels.Dictionary.ShowConnectionNewMenuItem = false; StiOptions.Designer.Panels.Dictionary.ShowDataSourceNewMenuItem = false;
It only remains to wait the next prerelease for to remove Business Object
Thank you very much.