Skip to main content
All docs
V25.1
  • RichEditBarItemNames.InsertIfField Property

    Gets the Insert If Field item’s name.

    Namespace: DevExpress.Blazor.RichEdit

    Assembly: DevExpress.Blazor.RichEdit.v25.1.dll

    NuGet Package: DevExpress.Blazor.RichEdit

    Declaration

    public static string InsertIfField { get; }

    Property Value

    Type Description
    String

    The “InsertMergeField” string.

    Remarks

    Use this property to perform the following operations with the Insert If Field item:

    The Insert If Field item is a button in the Insert Field Menu. This button inserts an empty IF field at the caret position.

    The following code snippet removes the Insert If Field item from the Insert Field Menu:

    <DxRichEdit CustomizeRibbon="onCustomizeRibbon" />
    
    @code {
        void onCustomizeRibbon(IRibbon ribbon) {
            IBarItem insertFieldMenu = ribbon.Tabs[RichEditRibbonTabNames.MailMerge].Groups[RichEditRibbonGroupNames.MailMergeInsertFields].Items[RichEditBarItemNames.InsertFieldMenu];
            if (insertFieldMenu.Type == BarItemTypes.DropDown) {
                IBarDropDown insertFieldDropDown = (IBarDropDown)insertFieldMenu;
                insertFieldDropDown.Items.Remove(RichEditBarItemNames.InsertIfField);
            }
        }
    }
    
    See Also