Disable Aspxrichedit buttons

Asked

Viewed 44 times

0

In my application, I use the component Aspxrichedit, which is a text editor full of buttons to save, open, change the font, etc. However, I don’t want some buttons like the Open and Save, for example, become visible to the user. How can I hide them?

inserir a descrição da imagem aqui

2 answers

3

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!.

  • 'Exportoptionspropertiesnames.Html' dos not contain a Definition for 'Devexpress' because of the first line...

0


I got it with 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>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.