Hi there,
With the Open dropdown, there's a "From Service" and "From Device", how do you customize these? (similar to this: https://www.syncfusion.com/forums/170437/add-custom-item-to-report-designer)
I tried something similar to this:
but wasn't able to get it working
|
Step1: You need to add the customize icon by referring the code snippet
$('#' + controlId).boldReportDesigner({
serviceUrl: serviceUrl,
reportServerUrl: serverUrl,
ajaxBeforeLoad: ajaxBeforeSend,
create: $.proxy(controlInitialized, this),
reportModified: $.proxy(reportModified, this),
reportSaved: $.proxy(reportSaved, this),
serviceAuthorizationToken: token,
toolbarSettings:
{
items: ej.ReportDesigner.ToolbarItems.All & ~ej.ReportDesigner.ToolbarItems.Save
& ~ej.ReportDesigner.ToolbarItems.Open & ~ej.ReportDesigner.ToolbarItems.New
},
toolbarRendering: toolbarRendering,
toolbarClick: toolbarClick,
permissionSettings: {
dataSet: ~ej.ReportDesigner.Permission.All,
dataSource: ~ej.ReportDesigner.Permission.All,
}
});
|
|
Step2: To customize the save button for save report directly using toolbar rendering and toolbar-click event.
function toolbarRendering(args) {
if ($(args.target).hasClass('e-rptdesigner-toolbarcontainer')) {
var openButton = ej.buildTag('li.e-rptdesigner-toolbarli e-designer-toolbar-align e-tooltxt', '', {}, {});
var openIcon = ej.buildTag('span.e-rptdesigner-toolbar-icon e-toolbarfonticonbasic e-rptdesigner-toolbar-open e-li-item', '', {}, { title: 'Open' });
args.target.find('ul:first').append(openButton.append(openIcon));
}
}
function toolbarClick(args) {
// Write your block of code
var designer = $('#' + controlId).data('boldReportDesigner');
designer.openReport();
}
|
Hi Arumugasami,
Thanks for your reply.
I already have those couple lines of code. I wasn't looking to add a new item, I was looking to customize an existing one. So when you click on the Open button, I'd like to have an option ("From Server" or "From Data Base", etc). Can you provide an example on how to do that?
Basically, how can you modify the dropdowns of the open button?
Thanks!
Hi Arumugasami,
I'm looking to both remove the existing "From Device..." and "From Server..." and add ones for "Open From X" and "Open From Y"
Thank you