Disable ASPxRichEdit buttons

0

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?

    
asked by anonymous 30.01.2018 / 14:18

2 answers

0

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>
    
01.02.2018 / 14:28
2

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()

Reference Here! .

    
30.01.2018 / 14:24