Remove Option of the Context Menu

Stimulsoft Reports.NET discussion
Post Reply
gsabel
Posts: 8
Joined: Tue Jan 17, 2012 7:48 am
Location: Brazil

Remove Option of the Context Menu

Post by gsabel »

I need remove of the Context Menu the options "New Data Source" and "New Connection" that open in sidebar Dictionary.

How I do it?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Remove Option of the Context Menu

Post by HighAley »

Hello.
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?
Please, try to use next code:

Code: Select all

StiOptions.Designer.Panels.Dictionary.ShowConnectionNewMenuItem = false;
StiOptions.Designer.Panels.Dictionary.ShowDataSourceNewMenuItem = false;
Thank you.
gsabel
Posts: 8
Joined: Tue Jan 17, 2012 7:48 am
Location: Brazil

Remove Option of the Context Menu

Post by gsabel »

I already tried that, but, don't work.

I can hide two items of the Context Menu with this code:

Code: Select all

StiDictionaryPanelService service = StiDictionaryPanelService.GetService(stiDesignerControl1);
            service.SetDictionaryDatabaseNew(false); // Hide  "New Connection..."
            service.ShowBusinessObjectNewMenuItem = false; // Hide  "New Business Object..."
But the other properties do not work.

Now, I need hide the following Items:
Attachments
1581.Business Objects.jpg
1581.Business Objects.jpg (27.96 KiB) Viewed 1638 times
1579.New Data Source....jpg
1579.New Data Source....jpg (40.11 KiB) Viewed 1638 times
gsabel
Posts: 8
Joined: Tue Jan 17, 2012 7:48 am
Location: Brazil

Remove Option of the Context Menu

Post by gsabel »

gsabel wrote:I already tried that, but, don't work.

I can hide two items of the Context Menu with this code:

Code: Select all

StiDictionaryPanelService service = StiDictionaryPanelService.GetService(stiDesignerControl1);
            service.SetDictionaryDatabaseNew(false); // Hide  "New Connection..."
            service.ShowBusinessObjectNewMenuItem = false; // Hide  "New Business Object..."
But the other properties do not work.

Now, I need hide the following Items:
gsabel
Posts: 8
Joined: Tue Jan 17, 2012 7:48 am
Location: Brazil

Remove Option of the Context Menu

Post by gsabel »

I already tried that, but, don't work.

I can hide two items of the Context Menu with this code:

Code: Select all

StiDictionaryPanelService service = StiDictionaryPanelService.GetService(stiDesignerControl1);
            service.SetDictionaryDatabaseNew(false); // Hide "New Connection..."
            service.ShowBusinessObjectNewMenuItem = false; // Hide  "New Business Object..."
But the other properties do not work.

Now, I need hide the following Items:
Attachments
1584.Business Objects.jpg
1584.Business Objects.jpg (27.75 KiB) Viewed 1696 times
1583.New Data Source....jpg
1583.New Data Source....jpg (40.11 KiB) Viewed 1696 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Remove Option of the Context Menu

Post by HighAley »

Hello.

Please check these properties on our next prerelease build tomorrow.

Code: Select all

StiOptions.Designer.Panels.Dictionary.ShowDataSourceNewMenuItem = false;
StiOptions.Designer.Panels.Dictionary.ShowEmptyBusinessObjectsCategory = false;
Thank you.
gsabel
Posts: 8
Joined: Tue Jan 17, 2012 7:48 am
Location: Brazil

Remove Option of the Context Menu

Post by gsabel »

Hi.
These properties functioned

Code: Select all

StiOptions.Designer.Panels.Dictionary.ShowConnectionNewMenuItem = false;
StiOptions.Designer.Panels.Dictionary.ShowDataSourceNewMenuItem = false;
That I was using this in the wrong place hehe

It only remains to wait the next prerelease for to remove Business Object

Thank you very much.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Remove Option of the Context Menu

Post by HighAley »

Hello.
gsabel wrote:Hi.
These properties functioned

Code: Select all

StiOptions.Designer.Panels.Dictionary.ShowConnectionNewMenuItem = false;
StiOptions.Designer.Panels.Dictionary.ShowDataSourceNewMenuItem = false;
That I was using this in the wrong place hehe

It only remains to wait the next prerelease for to remove Business Object

Thank you very much.
We are always glad to help you.

Let us know if you need any additional help.

Thank you.
Post Reply