Page 1 of 1
How to disable button duplicate and properties on connection dictionary?
Posted: Mon Mar 27, 2023 7:24 am
by investor123
Dear,
Can we disable or hide button duplicate and properties on the connection dictionary?
Re: How to disable button duplicate and properties on connection dictionary?
Posted: Thu Mar 30, 2023 3:37 am
by investor123
I also need to disable or hide Recent Connection when create new Data Source.
Looking forward for any help. Thank you
Re: How to disable button duplicate and properties on connection dictionary?
Posted: Fri Mar 31, 2023 8:50 am
by Lech Kulikowski
Hello,
Please try to check the following code:
Code: Select all
var designer = new Stimulsoft.Designer.StiDesigner(designerOptions, "StiDesigner", false);
designer.renderHtml("content");
designer.jsObject.InitializeSelectConnectionForm(function (form) {
designer.jsObject.oldInitializeSelectConnectionForm_ = designer.jsObject.InitializeSelectConnectionForm_;
designer.jsObject.InitializeSelectConnectionForm_ = function () {
var form = designer.jsObject.oldInitializeSelectConnectionForm_();
form.oldFillConnections = form.fillConnections;
form.fillConnections = function (connections) {
form.oldFillConnections(connections);
form.connectionGroups.Recent.style.display = "none";
form.container.firstChild.rows[0].firstChild.childNodes[1].getItemByName("Recent").style.display = "none";
}
return form;
}
});
Thank you.
Re: How to disable button duplicate and properties on connection dictionary?
Posted: Mon Apr 03, 2023 3:26 am
by investor123
Hi Lech, its work great.
Thank you so much for your help,
and my last request about disable or hide button duplicate and properties from context menu when we click on the connection tree. how to do it?
Looking forward for your help.
Re: How to disable button duplicate and properties on connection dictionary?
Posted: Tue Apr 04, 2023 9:53 am
by Lech Kulikowski
Hello,
Please check the following code:
var designer = new Stimulsoft.Designer.StiDesigner(designerOptions, "StiDesigner", false);
designer.renderHtml("content");
var dictionaryContextMenu = designer.jsObject.options.menus.dictionaryContextMenu || designer.jsObject.InitializeDictionaryContextMenu();
dictionaryContextMenu.items.properties.parentElement.removeChild(dictionaryContextMenu.items.properties);
dictionaryContextMenu.items.duplicateItem.parentElement.removeChild(dictionaryContextMenu.items.duplicateItem);
Thank you.
Re: How to disable button duplicate and properties on connection dictionary?
Posted: Tue Apr 11, 2023 3:14 am
by investor123
Hi, I have done all of this and its work. Thank you very much
Re: How to disable button duplicate and properties on connection dictionary?
Posted: Tue Apr 11, 2023 8:58 am
by Lech Kulikowski
Hello,
You are welcome.