4 Answers, 1 is accepted
0
Hello Mic,
One option to hide the Save button is to declare the Toolbar and add in it the desired buttons as demonstrated in the RadSpreadsheet - Telerik ASP.NET Spreadsheet and Spreadsheet - Full Set of Tools demos.
Another option would be hiding the button with JavaScript:
Regards,
Peter Milchev
Progress Telerik
One option to hide the Save button is to declare the Toolbar and add in it the desired buttons as demonstrated in the RadSpreadsheet - Telerik ASP.NET Spreadsheet and Spreadsheet - Full Set of Tools demos.
Another option would be hiding the button with JavaScript:
<script>
var
$ = $ || $telerik.$;
function
f() {
var
spread = $find(
"<%= RadSpreadsheet1.ClientID%>"
);
var
homeToolbar = $(spread.get_element()).find(
".RadToolBar"
)[0].control;
// or
// var homeToolbar = $(spread.get_element()).find(".rtbButton[title=Save]").closest('.RadToolBar')[0].control;
homeToolbar.findItemByText(
"Save"
).hide();
// Sys.Application.remove_load(f);
}
Sys.Application.add_load(f);
</script>
Regards,
Peter Milchev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Mic
Top achievements
Rank 1
answered on 07 Mar 2018, 01:39 PM
Thanks Peter,
my web site is multi-language so I try this:
...
homeToolbar.findButtonByCommandName(
"ToolBarCommand"
).hide();
It seems to work.
Thanks
Mic
0
Saifulla
Top achievements
Rank 1
answered on 03 Oct 2018, 10:07 AM
This works fine, but this not removes the tab strips. how can we do this.
0
Hello Saifulla,
To hide the TabStrip and the ToolBar, you can use the following code:
Regards,
Peter Milchev
Progress Telerik
To hide the TabStrip and the ToolBar, you can use the following code:
<script>
var
$ = $ || $telerik.$;
function
spreadsheetLoadEventHandler() {
var
spread = $find(
"<%= RadSpreadsheet1.ClientID%>"
);
// hide the tabstrip (e.g. Home, Insert, Data)
var
tabStrip = $(spread.get_element()).find(
".RadTabStrip"
)[0].control
tabStrip.set_visible(
false
);
// hide the toolbar (e.g. Save, Paste, Format, etc. )
var
homeToolbar = $(spread.get_element()).find(
".RadToolBar"
)[0].control;
homeToolbar.set_visible(
false
);
// repaint the spreadsheet
spread.get_kendoWidget().refresh()
// Sys.Application.remove_load(f);
}
Sys.Application.add_load(spreadsheetLoadEventHandler);
</script>
Regards,
Peter Milchev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.