In my application, I use the ASPxRichEdit component, which is a full-text editor for saving, opening, changing the font, etc. However, I do not want some buttons such as Open and Save , for example, to be visible to the user. How can I hide them?
I got the following markup :
<dx:ASPxRichEdit ID="ASPxRichEdit1" ClientInstanceName="rich" style="width: 100%; height: 600px" runat="server" WorkDirectory="~\App_Data\WorkDirectory" OnCallback="ASPxRichEdit1_Callback">
<Settings Behavior-Open="Hidden" Behavior-Save="Hidden" Behavior-SaveAs="Hidden"></Settings>
</dx:ASPxRichEdit>
Add this code to the PreRender event:
[C#]
@Html.DevExpress().Spreadsheet(settings => {
settings.Name = "Spreadsheet";
settings.PreRender = (s, e) => {
DevExpress.Web.ASPxSpreadsheet.ASPxSpreadsheet spreadsheet = (DevExpress.Web.ASPxSpreadsheet.ASPxSpreadsheet)s;
spreadsheet.CreateDefaultRibbonTabs(true);
DevExpress.Web.ASPxRibbon.RibbonTab fileTab = spreadsheet.RibbonTabs[0];
fileTab.Groups[0].Items[0].ClientEnabled = false;
fileTab.Groups[0].Items[1].ClientEnabled = false;
};
}).GetHtml()