Is there a way to remove the Current Data sources and Create a Custom one.
My clients don't know SQL and they would be confused with all the choices.
I would like to create my on GUI for a datasource.
thank you!
Custom Data Source
Re: Custom Data Source
Hello,
Please try to check the following code:
Thank you.
Please try to check the following code:
Code: Select all
<body>
<form id="form1" runat="server">
<cc3:StiWebDesigner runat="server"
ID="StiWebDesigner1" Localization="en.xml"
OnGetReport="StiWebDesigner1_GetReport"
OnCreateReport="StiWebDesigner1_CreateReport"
OnOpenReport="StiWebDesigner1_OpenReport"
OnPreviewReport="StiWebDesigner1_PreviewReport"
OnExit="StiWebDesigner1_Exit" />
</form>
<script type="text/javascript">
// where jsStiWebDesigner1 - "js" + Designer Id
//Override Dictionary NewItem Menu
var dictionaryNewItemMenu = jsStiWebDesigner1.options.menus.dictionaryNewItemMenu || jsStiWebDesigner1.InitializeDictionaryNewItemMenu();
dictionaryNewItemMenu.oldAction = dictionaryNewItemMenu.action;
dictionaryNewItemMenu.action = function (menuItem) {
this.changeVisibleState(false);
if (menuItem.key == "dataSourceNew") {
//write your code here
alert("New DataSource was clicked!")
}
else {
dictionaryNewItemMenu.oldAction(menuItem);
}
}
//Override Dictionary ContextMenu
var dictionaryContextMenu = jsStiWebDesigner1.options.menus.dictionaryContextMenu || jsStiWebDesigner1.InitializeDictionaryContextMenu();
dictionaryContextMenu.oldAction = dictionaryContextMenu.action;
dictionaryContextMenu.action = function (menuItem) {
this.changeVisibleState(false);
if (menuItem.key == "dataSourceNew") {
//write your code here
alert("New DataSource was clicked!")
}
else {
dictionaryContextMenu.oldAction(menuItem);
}
}
</script>
</body>
Re: Custom Data Source
Thank you for that.
I did have to modify the code that you sent. (had to add jsObject to the lines below.)
Updated code below:
I did have to modify the code that you sent. (had to add jsObject to the lines below.)
Updated code below:
Code: Select all
var designer = new Stimulsoft.Designer.StiDesigner();
var dictionaryNewItemMenu = designer.jsObject.options.menus.dictionaryNewItemMenu || designer.jsObject.InitializeDictionaryNewItemMenu();
dictionaryNewItemMenu.oldAction = dictionaryNewItemMenu.action;
dictionaryNewItemMenu.action = function (menuItem) {
this.changeVisibleState(false);
if (menuItem.key == "dataSourceNew") {
//write your code here
alert("New DataSource was clicked!")
}
else {
dictionaryNewItemMenu.oldAction(menuItem);
}
}
//Override Dictionary ContextMenu
var dictionaryContextMenu = designer.jsObject.options.menus.dictionaryContextMenu || designer.jsObject.InitializeDictionaryContextMenu();
dictionaryContextMenu.oldAction = dictionaryContextMenu.action;
dictionaryContextMenu.action = function (menuItem) {
this.changeVisibleState(false);
if (menuItem.key == "dataSourceNew") {
//write your code here
alert("New DataSource was clicked!")
}
else {
dictionaryContextMenu.oldAction(menuItem);
}
}
Re: Custom Data Source
Hello
We are always glad to help you!
Please let us know if you need any additional help.
Thank you.
We are always glad to help you!
Please let us know if you need any additional help.
Thank you.